diff options
author | Joe Orton <joe@manyfish.uk> | 2022-03-25 15:27:35 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2022-03-25 15:41:01 +0000 |
commit | 9924d4d31525f8b61e37076b18004c603fd01761 (patch) | |
tree | aa5a8cff608af811978adf39e48c290d024d0d6f | |
parent | d0617fd43d7c0ffe1761b89a1becdb08b9d642c2 (diff) | |
download | neon-git-9924d4d31525f8b61e37076b18004c603fd01761.tar.gz |
* src/ne_openssl.c: Fix possible build failures w/o pthreads for
OpenSSL 1.1.0+. (fixes #71)
-rw-r--r-- | src/ne_openssl.c | 9 |
1 files 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 <openssl/opensslv.h> #include <openssl/evp.h> -#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 <stdlib.h> /* for abort() */ #ifndef _WIN32 #include <pthread.h> @@ -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 |