packages/lang/python/python3/patches/002-fix-blake2-detection.patch
Yorkie Liu 85eee2d7f8 python3: fix build when Blake2 not enabled in OpenSSL
Refs:

- 7c20888e71
- https://bugs.python.org/issue38684

Signed-off-by: Yorkie Liu <yorkiefixer@gmail.com>
2019-11-21 18:18:14 +08:00

11 lines
244 B
Diff

--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -42,7 +42,7 @@
#define PY_OPENSSL_HAS_SHAKE 1
#endif
-#ifdef NID_blake2b512
+#if defined(NID_blake2b512) && !defined(OPENSSL_NO_BLAKE2)
#define PY_OPENSSL_HAS_BLAKE2 1
#endif