From 088c61e88450a505e5eefbaed7c88b0fb02aadcc Mon Sep 17 00:00:00 2001 From: yaoguangzhong Date: Thu, 29 Dec 2022 20:35:49 +0800 Subject: [PATCH] backport fix possible build failures w/o pthreads for OpenSSL 1.1.0+ From: Joe Orton Signed-off-by: Guangzhong Yao --- ...-Fix-possible-build-failures-w-o-pth.patch | 40 +++++++++++++++++++ neon.spec | 6 ++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 neon-0.30.2-ne_openssl.c-Fix-possible-build-failures-w-o-pth.patch diff --git a/neon-0.30.2-ne_openssl.c-Fix-possible-build-failures-w-o-pth.patch b/neon-0.30.2-ne_openssl.c-Fix-possible-build-failures-w-o-pth.patch new file mode 100644 index 0000000..b7ee9b5 --- /dev/null +++ b/neon-0.30.2-ne_openssl.c-Fix-possible-build-failures-w-o-pth.patch @@ -0,0 +1,40 @@ +From 9924d4d31525f8b61e37076b18004c603fd01761 Mon Sep 17 00:00:00 2001 +From: Joe Orton +Date: Fri, 25 Mar 2022 15:27:35 +0000 +Subject: [PATCH] * src/ne_openssl.c: Fix possible build failures w/o pthreads + for OpenSSL 1.1.0+. (fixes #71) + +--- + src/ne_openssl.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/ne_openssl.c b/src/ne_openssl.c +index 41a5c05..c25c911 100644 +--- a/src/ne_openssl.c ++++ b/src/ne_openssl.c +@@ -37,7 +37,9 @@ + #include + #include + +-#ifdef NE_HAVE_TS_SSL ++#if defined(NE_HAVE_TS_SSL) && OPENSSL_VERSION_NUMBER < 0x10100000L ++/* From OpenSSL 1.1.0 locking callbacks are no longer needed. */ ++#define WITH_OPENSSL_LOCKING (1) + #include /* for abort() */ + #ifndef _WIN32 + #include +@@ -1194,10 +1196,7 @@ char *ne_vstrhash(unsigned int flags, va_list ap) + return ne__strhash2hex(v, vlen, flags); + } + +-#if defined(NE_HAVE_TS_SSL) && OPENSSL_VERSION_NUMBER < 0x10100000L +-/* From OpenSSL 1.1.0 locking callbacks are no longer needed. */ +-#define WITH_OPENSSL_LOCKING (1) +- ++#ifdef WITH_OPENSSL_LOCKING + /* Implementation of locking callbacks to make OpenSSL thread-safe. + * If the OpenSSL API was better designed, this wouldn't be necessary. + * In OpenSSL releases without CRYPTO_set_idptr_callback, it's not +-- +2.27.0 + diff --git a/neon.spec b/neon.spec index 3695ca1..d62130f 100644 --- a/neon.spec +++ b/neon.spec @@ -1,6 +1,6 @@ Name: neon Version: 0.30.2 -Release: 13 +Release: 14 Summary: An HTTP and WebDAV client library License: LGPLv2+ URL: http://www.webdav.org/neon/ @@ -12,6 +12,7 @@ Patch1: neon-0.30.2-sysuioh.patch Patch2: neon-0.30.2-lockprintf.patch Patch3: neon-0.30.2-test-.c-Switch-to-destroy_and_wait-in-various-places.patch Patch4: neon-0.30.2-backport-mak-Replace-GX-with-EHsc.patch +Patch5: neon-0.30.2-ne_openssl.c-Fix-possible-build-failures-w-o-pth.patch BuildRequires: gcc git openssl-devel expat-devel gdb-headless Requires: ca-certificates @@ -85,6 +86,9 @@ sed -ri "/^dependency_libs/{s,-l[^ ']*,,g}" \ %{_mandir}/man3/* %changelog +* Thu Dec 29 2022 Guangzhong Yao - 0.30.2-14 +- DESC: backport fix possible build failures w/o pthreads for OpenSSL 1.1.0+ + * Thu Dec 29 2022 Guangzhong Yao - 0.30.2-13 - DESC: backport neon.mak Replace GX with EHsc -- Gitee