Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > c6fb3bd5936723b059d529119d4a9903 > files > 4

apr-1.3.3-2.1mdv2009.0.src.rpm


Use RTLD_DEEPBIND by default if supported. Should really be done with a 
new function and a caller-specified flag but that got vetoed
upstream, and DEEPBIND is a good default.


--- dso/unix/dso.c	2005-02-04 21:44:01.000000000 +0100
+++ dso/unix/dso.c.oden	2005-12-21 11:45:26.000000000 +0100
@@ -123,8 +123,13 @@
     void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
 
 #else
+#ifdef RTLD_DEEPBIND
+    int flags = RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND;
+#else
     int flags = RTLD_NOW | RTLD_GLOBAL;
+#endif
     void *os_handle;
+
 #ifdef _AIX
     if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')')
     {