From 0b99e5bcea78ffe2186f7766aea255130a969772 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 07:47:40 +0000 Subject: Apply patch apr-1.4.8-deepbind.patch patch_name: apr-1.4.8-deepbind.patch present_in_specfile: true --- diff --git a/dso/unix/dso.c b/dso/unix/dso.c index fdd56f1..4cc597a 100644 --- a/dso/unix/dso.c +++ b/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 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, #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] == ')') {