[MPlayer-dev-eng] [PATCH] libvo/gl_common.c: Use RTLD_DEFAULT instead of 0 for dlsym to increase portability

Jeremy Huddleston jeremyhu at macports.org
Thu Apr 23 11:33:02 CEST 2009


RTLD_DEFAULT is not always 0.  It's 0 on linux, but it's -2 on darwin.

--- libvo/gl_common.c	2009-04-23 02:09:43.000000000 -0700
+++ libvo/gl_common.c	2009-04-23 02:10:18.000000000 -0700
@@ -1547,7 +1547,7 @@ static void *getdladdr(const char *s) {
     handle = dlopen(NULL, RTLD_LAZY);
   return dlsym(handle, s);
#else
-  return dlsym(0, s);
+  return dlsym(RTLD_DEFAULT, s);
#endif
#else
   return NULL;



More information about the MPlayer-dev-eng mailing list