Blame SOURCES/apr-1.4.8-deepbind.patch

ec8672
--- apr-1.4.8/dso/unix/dso.c.deepbind
ec8672
+++ apr-1.4.8/dso/unix/dso.c
6f1a97
@@ -38,6 +38,8 @@
6f1a97
 #define DYLD_LIBRARY_HANDLE (void *)-1
6f1a97
 #endif
ec8672
 
6f1a97
+static int use_deepbind; /* 0 = unset, 1 = use DEEPBIND, -1, don't use DEEPBIND */
6f1a97
+
6f1a97
 APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
6f1a97
                                                 apr_os_dso_handle_t osdso,
6f1a97
                                                 apr_pool_t *pool)
6f1a97
@@ -125,6 +127,12 @@
ec8672
 #else
6f1a97
     int flags = RTLD_NOW | RTLD_GLOBAL;
ec8672
     void *os_handle;
6f1a97
+
6f1a97
+    if (use_deepbind == 0)
6f1a97
+        use_deepbind = getenv("APR_DEEPBIND") != NULL ? 1 : -1;
6f1a97
+    if (use_deepbind == 1)
6f1a97
+        flags |= RTLD_DEEPBIND;
6f1a97
+
ec8672
 #ifdef _AIX
ec8672
     if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')')
6f1a97
     {