From 085382fb17a560dd11e4710077b63a26d5dcf05c Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 24 Dec 2019 00:03:13 +0100 Subject: Add pthread linking on non-win32 (#5086) Required to link in static part of pthread, e.g. pthread_atfork Fixes https://github.com/pyca/cryptography/issues/5084 --- src/_cffi_src/build_openssl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py index 1740cc59..a09d6d8e 100644 --- a/src/_cffi_src/build_openssl.py +++ b/src/_cffi_src/build_openssl.py @@ -37,7 +37,10 @@ def _get_openssl_libraries(platform): # specified on the linker command-line is significant; # libssl must come before libcrypto # (https://marc.info/?l=openssl-users&m=135361825921871) - return ["ssl", "crypto"] + # -lpthread required due to usage of pthread an potential + # existance of a static part containing e.g. pthread_atfork + # (https://github.com/pyca/cryptography/issues/5084) + return ["ssl", "crypto", "pthread"] def _extra_compile_args(platform): -- cgit v1.2.3