diff options
author | Kristian Høgsberg <[email protected]> | 2008-02-25 20:02:25 -0500 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-02-25 20:02:25 -0500 |
commit | 129b9ad16f95421d12f77c1bd3eca915d8768b78 (patch) | |
tree | 84b152db21468582dffb91e43d08f754e62ac17f /src/mesa | |
parent | bcecea6ea6c2727e4071f5a43fab49673573e905 (diff) |
Use dlsym() to avoid referencing __dri2DriverInitScreen.
Sort-of a stop-gap workaround. There are a couple of nicer ways to
do this that doesn't require dlfcn.h, but they're more invasive.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 9928a0f0319..ce8ae5e2994 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -883,6 +883,11 @@ __DRI2_CREATE_NEW_SCREEN(int scrn, __DRIscreen *psc, static const __DRIextension *emptyExtensionList[] = { NULL }; dri_interface = interface; unsigned int *p; + __GLcontextModes *(*initScreen)(__DRIscreen *psc); + + initScreen = dlsym(NULL, __dri2DriverInitScreen); + if (initScreen == NULL) + return NULL; psp = _mesa_malloc(sizeof(*psp)); if (!psp) @@ -931,7 +936,7 @@ __DRI2_CREATE_NEW_SCREEN(int scrn, __DRIscreen *psc, psc->createNewDrawable = driCreateNewDrawable; psc->createNewContext = driCreateNewContext; - *driver_modes = __dri2DriverInitScreen(psp); + *driver_modes = initScreen(psp); if (*driver_modes == NULL) { drmBOUnmap(psp->fd, &psp->dri2.sareaBO); drmBOUnreference(psp->fd, &psp->dri2.sareaBO); |