Explicitly use the RTLD_LOCAL flag since that's the behavior we want.
authorSam Lantinga <slouken@libsdl.org>
Wed, 07 Aug 2013 17:26:28 -0700
changeset 7598 4ea0b0177a57
parent 7597 b7219f6cf67a
child 7599 bd0c15431dc9
Explicitly use the RTLD_LOCAL flag since that's the behavior we want. The default on Linux is RTLD_LOCAL, the default on Mac OS X is RTLD_GLOBAL.
src/loadso/dlopen/SDL_sysloadso.c
--- a/src/loadso/dlopen/SDL_sysloadso.c	Wed Aug 07 16:32:51 2013 -0700
+++ b/src/loadso/dlopen/SDL_sysloadso.c	Wed Aug 07 17:26:28 2013 -0700
@@ -33,7 +33,7 @@
 void *
 SDL_LoadObject(const char *sofile)
 {
-    void *handle = dlopen(sofile, RTLD_NOW);
+    void *handle = dlopen(sofile, RTLD_NOW|RTLD_LOCAL);
     const char *loaderror = (char *) dlerror();
     if (handle == NULL) {
         SDL_SetError("Failed loading %s: %s", sofile, loaderror);