From: Alexandru Ardelean Date: Mon, 4 Nov 2019 14:55:56 +0000 (+0200) Subject: bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (#17043) X-Git-Tag: v3.9.0a1~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6552563b3d5061816720a5a6c7d4ffd6ba35b98b;p=thirdparty%2FPython%2Fcpython.git bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (#17043) --- diff --git a/Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst b/Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst new file mode 100644 index 000000000000..c715ff970412 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst @@ -0,0 +1 @@ +Fix _hashlib build when Blake2 is disabled, but OpenSSL supports it. diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index b147dbe8b3c5..360e444e7f4a 100644 --- 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