package/neon: fix ssl build without threads
Fix the following ssl build failure without threads raised since bump to version 0.32.2 in commit029a6dc3e3
and281c84fc39
: ne_openssl.c:43:10: fatal error: pthread.h: No such file or directory 43 | #include <pthread.h> | ^~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/da995ef26001357e51a5907de9c6111b9ff89bdf Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
3e4d439113
commit
6d5061c711
@ -0,0 +1,76 @@
|
||||
From 8f9e110b391f065536780d19c2257ad7afd83522 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Mon, 31 Jan 2022 23:42:13 +0100
|
||||
Subject: [PATCH] Revert "Advertise TS_SSL feature with OpenSSL >= 1.1.0."
|
||||
|
||||
This reverts commit 281c84fc3996c757efdf6e9b3f906d7a1fc08b1d.
|
||||
|
||||
Indeed openssl can be built on toolchains without threads support which
|
||||
will result in the following build failure:
|
||||
|
||||
ne_openssl.c:43:10: fatal error: pthread.h: No such file or directory
|
||||
43 | #include <pthread.h>
|
||||
| ^~~~~~~~~~~
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/da995ef26001357e51a5907de9c6111b9ff89bdf
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/notroj/neon/pull/71]
|
||||
---
|
||||
macros/neon.m4 | 15 ++++-----------
|
||||
src/ne_openssl.c | 4 ++--
|
||||
2 files changed, 6 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/macros/neon.m4 b/macros/neon.m4
|
||||
index 129d4ac..5a5fb1b 100644
|
||||
--- a/macros/neon.m4
|
||||
+++ b/macros/neon.m4
|
||||
@@ -960,13 +960,9 @@ yes|openssl)
|
||||
AC_CHECK_HEADERS(openssl/ssl.h openssl/opensslv.h,,
|
||||
[AC_MSG_ERROR([OpenSSL headers not found, cannot enable SSL support])])
|
||||
|
||||
+ # Enable EGD support if using 0.9.7 or newer
|
||||
NE_CHECK_OPENSSLVER(ne_cv_lib_ssl097, 0.9.7, 0x00907000L)
|
||||
- NE_CHECK_OPENSSLVER(ne_cv_lib_ssl110, 1.1.0, 0x10100000L)
|
||||
- if test "$ne_cv_lib_ssl110" = "yes"; then
|
||||
- NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL $NE_SSL_VERSION])
|
||||
- AC_DEFINE(HAVE_OPENSSL11, 1, [Enable OpenSSL 1.1 support])
|
||||
- elif test "$ne_cv_lib_ssl097" = "yes"; then
|
||||
- # Enable EGD support if using 0.9.7 or newer
|
||||
+ if test "$ne_cv_lib_ssl097" = "yes"; then
|
||||
AC_MSG_NOTICE([OpenSSL >= 0.9.7; EGD support not needed in neon])
|
||||
NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL $NE_SSL_VERSION])
|
||||
NE_CHECK_FUNCS(CRYPTO_set_idptr_callback SSL_SESSION_cmp)
|
||||
@@ -1074,11 +1070,8 @@ CC/CFLAGS/LIBS must be used to make the POSIX library interfaces
|
||||
available]),,
|
||||
enable_threadsafe_ssl=no)
|
||||
|
||||
-case ${enable_threadsafe_ssl}X${ne_cv_lib_ssl110} in
|
||||
-*Xyes)
|
||||
- NE_ENABLE_SUPPORT(TS_SSL, [OpenSSL is natively thread-safe])
|
||||
- ;;
|
||||
-posixX*|yesX*)
|
||||
+case $enable_threadsafe_ssl in
|
||||
+posix|yes)
|
||||
ne_pthr_ok=yes
|
||||
AC_CHECK_FUNCS([pthread_mutex_init pthread_mutex_lock],,[ne_pthr_ok=no])
|
||||
if test "${ne_pthr_ok}" = "no"; then
|
||||
diff --git a/src/ne_openssl.c b/src/ne_openssl.c
|
||||
index 41a5c05..96c768e 100644
|
||||
--- a/src/ne_openssl.c
|
||||
+++ b/src/ne_openssl.c
|
||||
@@ -1194,8 +1194,8 @@ 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. */
|
||||
+#if defined(NE_HAVE_TS_SSL) && OPENSSL_VERSION_NUMBER < 0x10101000L
|
||||
+/* For OpenSSL 1.1.1 locking callbacks are no longer need at all. */
|
||||
#define WITH_OPENSSL_LOCKING (1)
|
||||
|
||||
/* Implementation of locking callbacks to make OpenSSL thread-safe.
|
||||
--
|
||||
2.34.1
|
||||
|
28
package/neon/0002-configure.ac-fix-autoreconf.patch
Normal file
28
package/neon/0002-configure.ac-fix-autoreconf.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From cf779609a5dd38f0a8fdb3c4539371f13fd3a24a Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 8 Feb 2022 18:34:25 +0100
|
||||
Subject: [PATCH] configure.ac: fix autoreconf
|
||||
|
||||
Add AC_CONFIG_MACRO_DIR(macros) to fix autoreconf
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: not sent yet]
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 37b14ec..122151d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1,5 +1,7 @@
|
||||
AC_PREREQ(2.58) dnl 2.58 required for AS_HELP_STRING
|
||||
|
||||
+AC_CONFIG_MACRO_DIR(macros)
|
||||
+
|
||||
dnl Extract the version (sans LF) from .version, created at release-time.
|
||||
m4_define(ne_version, [m4_translit(m4_include(.version), [
|
||||
])])
|
||||
--
|
||||
2.34.1
|
||||
|
@ -10,6 +10,8 @@ NEON_LICENSE = LGPL-2.0+ (library), GPL-2.0+ (manual and tests)
|
||||
NEON_LICENSE_FILES = src/COPYING.LIB test/COPYING README.md
|
||||
NEON_CPE_ID_VENDOR = webdav
|
||||
NEON_INSTALL_STAGING = YES
|
||||
# We're patching configure.ac
|
||||
NEON_AUTORECONF = YES
|
||||
NEON_CONF_OPTS = --without-gssapi --disable-rpath
|
||||
NEON_CONFIG_SCRIPTS = neon-config
|
||||
NEON_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
|
||||
|
Loading…
Reference in New Issue
Block a user