VirtualBox

Ignore:
Timestamp:
Mar 6, 2020 7:10:38 PM (5 years ago)
Author:
vboxsync
Message:

bugref:9637. Build fix for some gcc version that cannot swallow some casts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r83224 r83229  
    409409        return VERR_NOT_FOUND;
    410410    }
    411 
    412     x11Context.pXRRSelectInput = (void (*)(Display*, Window, int))
    413         dlsym(x11Context.pRandLibraryHandle, "XRRSelectInput");
     411    *(void **)(&x11Context.pXRRSelectInput) = dlsym(x11Context.pRandLibraryHandle, "XRRSelectInput");
    414412    if (!x11Context.pXRRSelectInput)
    415413    {
     
    419417        return VERR_NOT_FOUND;
    420418    }
    421     x11Context.pXRRQueryExtension = (Bool (*)(Display *, int *, int *))
    422         dlsym(x11Context.pRandLibraryHandle, "XRRQueryExtension");
     419    *(void **)(&x11Context.pXRRQueryExtension) = dlsym(x11Context.pRandLibraryHandle, "XRRQueryExtension");
    423420    if (!x11Context.pXRRQueryExtension)
    424421    {
     
    428425        return VERR_NOT_FOUND;
    429426    }
    430     x11Context.pXRRQueryVersion = (Status (*)(Display *, int *, int*))
    431         dlsym(x11Context.pRandLibraryHandle, "XRRQueryVersion");
     427    *(void **)(&x11Context.pXRRQueryVersion) = dlsym(x11Context.pRandLibraryHandle, "XRRQueryVersion");
    432428    if (!x11Context.pXRRQueryVersion)
    433429    {
     
    437433        return VERR_NOT_FOUND;
    438434    }
    439 
    440     x11Context.pXRRGetMonitors = (XRRMonitorInfo* (*)(Display *, Window, Bool, int *))
    441         dlsym(x11Context.pRandLibraryHandle, "XRRGetMonitors");
     435    *(void **)(&x11Context.pXRRGetMonitors) = dlsym(x11Context.pRandLibraryHandle, "XRRGetMonitors");
    442436    if (!x11Context.pXRRGetMonitors)
    443437    {
     
    447441        return VERR_NOT_FOUND;
    448442    }
    449 
    450     x11Context.pXRRFreeMonitors = (void (*)(XRRMonitorInfo *))
    451         dlsym(x11Context.pRandLibraryHandle, "XRRFreeMonitors");
     443    *(void **)(&x11Context.pXRRFreeMonitors) = dlsym(x11Context.pRandLibraryHandle, "XRRFreeMonitors");
    452444    if (!x11Context.pXRRFreeMonitors)
    453445    {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette