apr/apr-1.7.0-deepbind.patch
Petr Šabata 51ae739451 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/apr#7ee0d5f90b00fe1dd8024da7295c368915f367a2
2020-10-14 21:50:30 +02:00

29 lines
880 B
Diff

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
+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 @@
#else
int flags = RTLD_NOW | RTLD_GLOBAL;
void *os_handle;
+
+ if (use_deepbind == 0)
+ use_deepbind = getenv("APR_DEEPBIND") != NULL ? 1 : -1;
+ if (use_deepbind == 1)
+ flags |= RTLD_DEEPBIND;
+
#ifdef _AIX
if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')')
{