apr/SOURCES/apr-1.4.8-deepbind.patch

25 lines
774 B
Diff
Raw Normal View History

2020-06-09 19:15:46 +00:00
--- apr-1.4.8/dso/unix/dso.c.deepbind
+++ apr-1.4.8/dso/unix/dso.c
2020-07-14 01:06:24 +00:00
@@ -38,6 +38,8 @@
#define DYLD_LIBRARY_HANDLE (void *)-1
#endif
2020-06-09 19:15:46 +00:00
2020-07-14 01:06:24 +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-06-09 19:15:46 +00:00
#else
2020-07-14 01:06:24 +00:00
int flags = RTLD_NOW | RTLD_GLOBAL;
2020-06-09 19:15:46 +00:00
void *os_handle;
2020-07-14 01:06:24 +00:00
+
+ if (use_deepbind == 0)
+ use_deepbind = getenv("APR_DEEPBIND") != NULL ? 1 : -1;
+ if (use_deepbind == 1)
+ flags |= RTLD_DEEPBIND;
+
2020-06-09 19:15:46 +00:00
#ifdef _AIX
if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')')
2020-07-14 01:06:24 +00:00
{