churchyard / rpms / python3

Forked from rpms/python3 2 years ago
Clone
Blob Blame Raw
diff --git a/setup.py b/setup.py
index f4f6e4fdb1f0..8536c350fe3a 100644
--- a/setup.py
+++ b/setup.py
@@ -2005,6 +2005,10 @@ def detect_ctypes(self, inc_dirs, lib_dirs):
             ext.libraries.append(ffi_lib)
             self.use_system_libffi = True
 
+        if sysconfig.get_config_var('HAVE_LIBDL'):
+            # for dlopen, see bpo-32647
+            ext.libraries.append('dl')
+
     def _decimal_ext(self):
         extra_compile_args = []
         undef_macros = []