aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Spil <brnrd@freebsd.org>2022-07-11 13:51:31 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-07-11 13:51:31 +0000
commit45b8965983b9eb9ef808fe36a3346e2881bb16a0 (patch)
tree064f45682f805f32db22c286bb6d5f379b0c76f3
parent4c2fddeb7f59dbb8a861e425784a4a02fc11e40b (diff)
downloadports-45b8965983b9eb9ef808fe36a3346e2881bb16a0.tar.gz
ports-45b8965983b9eb9ef808fe36a3346e2881bb16a0.zip
lang/python38: Fix build with LibreSSL 3.5.*
PR: 264000
-rw-r--r--lang/python38/files/patch-libressl13
1 files changed, 13 insertions, 0 deletions
diff --git a/lang/python38/files/patch-libressl b/lang/python38/files/patch-libressl
new file mode 100644
index 000000000000..40e6af2427a8
--- /dev/null
+++ b/lang/python38/files/patch-libressl
@@ -0,0 +1,13 @@
+Fix build with LibreSSL 3.5.*
+
+--- Modules/_hashopenssl.c.orig 2022-03-16 12:22:54 UTC
++++ Modules/_hashopenssl.c
+@@ -37,7 +37,7 @@
+ # error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL"
+ #endif
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ /* OpenSSL < 1.1.0 */
+ #define EVP_MD_CTX_new EVP_MD_CTX_create
+ #define EVP_MD_CTX_free EVP_MD_CTX_destroy