apr/apr-1.7.0-deepbind.patch

29 lines
880 B
Diff
Raw Normal View History

2020-03-04 15:46:31 +00:00
Conflicting e.g. libldap vs libldap_r problems still exist
inside httpd. Use RTLD_DEEPBIND by default.
--- apr-1.7.0/dso/unix/dso.c.deepbind
+++ apr-1.7.0/dso/unix/dso.c
@@ -38,6 +38,8 @@
#define DYLD_LIBRARY_HANDLE (void *)-1
#endif
2020-03-04 15:46:31 +00:00
+static int use_deepbind; /* 0 = unset, 1 = use DEEPBIND, -1, don't use DEEPBIND */
+
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
@@ -125,6 +127,12 @@
2020-03-04 15:46:31 +00:00
#else
int flags = RTLD_NOW | RTLD_GLOBAL;
2020-03-04 15:46:31 +00:00
void *os_handle;
+
+ if (use_deepbind == 0)
+ use_deepbind = getenv("APR_DEEPBIND") != NULL ? 1 : -1;
+ if (use_deepbind == 1)
+ flags |= RTLD_DEEPBIND;
+
2020-03-04 15:46:31 +00:00
#ifdef _AIX
if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')')
{