Blame SOURCES/apr-1.4.8-deepbind.patch

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