From 5c19fc17407c785a696494ccafa74362e5f9904f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 30 Aug 2017 17:11:20 +1000 Subject: [PATCH] 4692. [bug] Fix build failures with libressl introduced in 4676. [RT #45879] (cherry picked from commit c26370fc697ea390f3b3856d07c616e304336e00) --- CHANGES | 3 +++ lib/dns/openssl_link.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 381b1389ff..c29f39bb8a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4692. [bug] Fix build failures with libressl introduced in 4676. + [RT #45879] + 4690. [bug] Command line options -4/-6 were handled inconsistently between tools. [RT #45632] diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c index 768c1b8520..5611152a78 100644 --- a/lib/dns/openssl_link.c +++ b/lib/dns/openssl_link.c @@ -124,7 +124,7 @@ lock_callback(int mode, int type, const char *file, int line) { } #endif -#if OPENSSL_VERSION_NUMBER < 0x10000000L +#if OPENSSL_VERSION_NUMBER < 0x10000000L || defined(LIBRESSL_VERSION_NUMBER) static unsigned long id_callback(void) { return ((unsigned long)isc_thread_self()); @@ -221,7 +221,7 @@ dst__openssl_init(const char *engine) { if (result != ISC_R_SUCCESS) goto cleanup_mutexalloc; CRYPTO_set_locking_callback(lock_callback); -# if OPENSSL_VERSION_NUMBER >= 0x10000000L +# if OPENSSL_VERSION_NUMBER >= 0x10000000L && OPENSSL_VERSION_NUMBER < 0x10100000L CRYPTO_THREADID_set_callback(_set_thread_id); # else CRYPTO_set_id_callback(id_callback);