diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/common/SConscript | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/megadriver_stub.c | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/common/SConscript b/src/mesa/drivers/dri/common/SConscript index 8b15532e3c0..41f6356c32d 100644 --- a/src/mesa/drivers/dri/common/SConscript +++ b/src/mesa/drivers/dri/common/SConscript @@ -30,6 +30,7 @@ drienv.Replace(CPPPATH = [ driswenv = drienv.Clone() driswenv.Append(CPPDEFINES = [ '__NOT_HAVE_DRM_H', + 'HAVE_DLADDR', ]) drienv.PkgUseModules('DRM') diff --git a/src/mesa/drivers/dri/common/megadriver_stub.c b/src/mesa/drivers/dri/common/megadriver_stub.c index 7b6d13450cc..d085080a197 100644 --- a/src/mesa/drivers/dri/common/megadriver_stub.c +++ b/src/mesa/drivers/dri/common/megadriver_stub.c @@ -28,10 +28,9 @@ /* We need GNU extensions to dlfcn.h in order to provide backward * compatibility for the older DRI driver loader mechanism. (dladdr, - * Dl_info, and RTLD_DEFAULT are only defined when _GNU_SOURCE is - * defined.) + * Dl_info, and RTLD_DEFAULT) */ -#ifdef RTLD_DEFAULT +#if defined(RTLD_DEFAULT) && defined(HAVE_DLADDR) #define MEGADRIVER_STUB_MAX_EXTENSIONS 10 #define LIB_PATH_SUFFIX "_dri.so" @@ -148,7 +147,7 @@ megadriver_stub_init(void) } } -#endif /* RTLD_DEFAULT */ +#endif /* RTLD_DEFAULT && HAVE_DLADDR */ static const __DRIconfig **stub_error_init_screen(__DRIscreen *psp) |