diff options
author | Tapani Pälli <[email protected]> | 2012-08-16 13:59:12 +0300 |
---|---|---|
committer | Matt Turner <[email protected]> | 2012-08-24 11:08:19 -0700 |
commit | 57c57df7b4579b60a84062df2e64f84dd84558b5 (patch) | |
tree | 496c51c3366fe21d4711f288f4392d41c798ae7f /src/mesa/main/dlopen.c | |
parent | df4dccc7a9691555e05c8945048603621340b5d7 (diff) |
mesa/dlopen: use HAVE_DLOPEN instead of _GNU_SOURCE
Patches changes mesa to use 'HAVE_DLOPEN' defined by configure and Android.mk
instead of _GNU_SOURCE for detecting dlopen capability. This makes dlopen to
work also on Android where _GNU_SOURCE is not defined.
[mattst88] v2: HAVE_DLOPEN is sufficient for including dlfcn.h, remove
mingw/blrts checks around dlfcn.h inclusion.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/mesa/main/dlopen.c')
-rw-r--r-- | src/mesa/main/dlopen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/dlopen.c b/src/mesa/main/dlopen.c index 57a33292ed1..aaee9636936 100644 --- a/src/mesa/main/dlopen.c +++ b/src/mesa/main/dlopen.c @@ -31,7 +31,7 @@ #include "compiler.h" #include "dlopen.h" -#if defined(_GNU_SOURCE) && !defined(__MINGW32__) && !defined(__blrts) +#if defined(HAVE_DLOPEN) #include <dlfcn.h> #endif #if defined(_WIN32) @@ -48,7 +48,7 @@ _mesa_dlopen(const char *libname, int flags) { #if defined(__blrts) return NULL; -#elif defined(_GNU_SOURCE) +#elif defined(HAVE_DLOPEN) flags = RTLD_LAZY | RTLD_GLOBAL; /* Overriding flags at this time */ return dlopen(libname, flags); #elif defined(__MINGW32__) @@ -80,7 +80,7 @@ _mesa_dlsym(void *handle, const char *fname) strncpy(fname2 + 1, fname, 998); fname2[999] = 0; u.v = dlsym(handle, fname2); -#elif defined(_GNU_SOURCE) +#elif defined(HAVE_DLOPEN) u.v = dlsym(handle, fname); #elif defined(__MINGW32__) u.v = (void *) GetProcAddress(handle, fname); @@ -99,7 +99,7 @@ _mesa_dlclose(void *handle) { #if defined(__blrts) (void) handle; -#elif defined(_GNU_SOURCE) +#elif defined(HAVE_DLOPEN) dlclose(handle); #elif defined(__MINGW32__) FreeLibrary(handle); |