diff --git a/SOURCES/apr-1.4.8-deepbind.patch b/SOURCES/apr-1.4.8-deepbind.patch
index 28f1c81..7925c6e 100644
--- a/SOURCES/apr-1.4.8-deepbind.patch
+++ b/SOURCES/apr-1.4.8-deepbind.patch
@@ -1,11 +1,24 @@
 --- apr-1.4.8/dso/unix/dso.c.deepbind
 +++ apr-1.4.8/dso/unix/dso.c
-@@ -123,7 +123,7 @@
-     void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
+@@ -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;
-+    int flags = RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND;
+     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] == ')')
+     {
diff --git a/SPECS/apr.spec b/SPECS/apr.spec
index 8700a23..2743cce 100644
--- a/SPECS/apr.spec
+++ b/SPECS/apr.spec
@@ -6,7 +6,7 @@
 Summary: Apache Portable Runtime library
 Name: apr
 Version: 1.6.3
-Release: 10%{?dist}
+Release: 11%{?dist}
 # ASL 2.0: everything
 # ISC: network_io/apr-1.4.6/network_io/unix/inet_?to?.c
 # BSD with advertising: strings/apr_snprintf.c, strings/apr_fnmatch.c,
@@ -141,6 +141,9 @@ popd
 %{_datadir}/aclocal/*.m4
 
 %changelog
+* Thu Jun 11 2020 Joe Orton <jorton@redhat.com> - 1.6.3-11
+- only enable RTLD_DEEPBIND if $APR_DEEPBIND is set in env (#1845912)
+
 * Thu May 28 2020 Joe Orton <jorton@redhat.com> - 1.6.3-10
 - use RTLD_DEEPBIND in apr_dso_open() (#1819607)