File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 218
218
sed s/__APPLE__/USE_LIBEDIT/g Modules/readline-libedit.c > tmp
219
219
mv tmp Modules/readline-libedit.c
220
220
221
+ # Modules/_hashopenssl.c redefines some libcrypto symbols on Python 3.9 and
222
+ # this makes the linker unhappy. So rename the symbols to work around.
223
+ # https://bugs.python.org/issue41949.
224
+ if [ " ${PYTHON_MAJMIN_VERSION} " = " 3.9" ]; then
225
+ patch -p1 << EOF
226
+ diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
227
+ index adc8653773..fc9070fc21 100644
228
+ --- a/Modules/_hashopenssl.c
229
+ +++ b/Modules/_hashopenssl.c
230
+ @@ -32,7 +32,7 @@
231
+ # error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL"
232
+ #endif
233
+
234
+ -#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
235
+ +#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
236
+ /* OpenSSL < 1.1.0 */
237
+ #define EVP_MD_CTX_new EVP_MD_CTX_create
238
+ #define EVP_MD_CTX_free EVP_MD_CTX_destroy
239
+ EOF
240
+ fi
241
+
221
242
# Most bits look at CFLAGS. But setup.py only looks at CPPFLAGS.
222
243
# So we need to set both.
223
244
CFLAGS=" ${EXTRA_TARGET_CFLAGS} -fPIC -I${TOOLS_PATH} /deps/include -I${TOOLS_PATH} /deps/include/ncursesw"
You can’t perform that action at this time.
0 commit comments