aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Grund <Flamefire@users.noreply.github.com>2019-12-24 00:03:13 +0100
committerAlex Gaynor <alex.gaynor@gmail.com>2019-12-23 18:03:13 -0500
commit085382fb17a560dd11e4710077b63a26d5dcf05c (patch)
tree6b635294ac3601a5de2bcb00bd7763caea33acb3 /src
parentd75335a7de77d4294bea29d03928229a83a77493 (diff)
downloadcryptography-085382fb17a560dd11e4710077b63a26d5dcf05c.tar.gz
cryptography-085382fb17a560dd11e4710077b63a26d5dcf05c.tar.bz2
cryptography-085382fb17a560dd11e4710077b63a26d5dcf05c.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/_cffi_src/build_openssl.py5
1 files changed, 4 insertions, 1 deletions
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):