python3.11/00291-setup-Link-ctypes-against-dl-explicitly.patch
2018-02-26 17:28:35 +01:00

16 lines
483 B
Diff

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 = []