aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/build_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-28 22:00:00 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-28 22:00:00 -0400
commit1e88d741f6e15d9170466a08dfe85f28b12c7623 (patch)
tree6866107b49202d2c4989ae57808dbe7b4481a14f /src/_cffi_src/build_openssl.py
parent22af62432d280017b00432de3e82aa71b64d12f9 (diff)
downloadcryptography-1e88d741f6e15d9170466a08dfe85f28b12c7623.tar.gz
cryptography-1e88d741f6e15d9170466a08dfe85f28b12c7623.tar.bz2
cryptography-1e88d741f6e15d9170466a08dfe85f28b12c7623.zip
fix libressl breakage reported in #2858
Diffstat (limited to 'src/_cffi_src/build_openssl.py')
-rw-r--r--src/_cffi_src/build_openssl.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py
index 2ff28d75..3f925290 100644
--- a/src/_cffi_src/build_openssl.py
+++ b/src/_cffi_src/build_openssl.py
@@ -38,8 +38,15 @@ def _osx_libraries(build_static):
_PRE_INCLUDE = """
+#include <openssl/opensslv.h>
+/*
+ LibreSSL removed e_os2.h from the public headers so we'll only include it
+ if we're using vanilla OpenSSL.
+*/
+#if !defined(LIBRESSL_VERSION_NUMBER)
#include <openssl/e_os2.h>
-#if defined(OPENSSL_SYS_WINDOWS)
+#endif
+#if defined(OPENSSL_SYS_WINDOWS) || defined(_WIN32)
#include <windows.h>
#endif
"""