Index: daemon/daemon.c =================================================================== --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -769,7 +769,7 @@ daemon_delete(struct daemon* daemon) # endif # ifdef HAVE_OPENSSL_CONFIG EVP_cleanup(); -# if OPENSSL_VERSION_NUMBER < 0x10100000 +# if (OPENSSL_VERSION_NUMBER < 0x10100000) || !defined(OPENSSL_NO_ENGINE) ENGINE_cleanup(); # endif CONF_modules_free(); Index: util/net_help.c =================================================================== --- a/util/net_help.c +++ b/util/net_help.c @@ -1006,10 +1006,10 @@ void* outgoing_ssl_fd(void* sslctx, int fd) static lock_basic_type *ub_openssl_locks = NULL; /** callback that gets thread id for openssl */ -static unsigned long -ub_crypto_id_cb(void) +static void +ub_crypto_id_cb(CRYPTO_THREADID *id) { - return (unsigned long)log_thread_get(); + CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get()); } static void @@ -1035,7 +1035,7 @@ int ub_openssl_lock_init(void) for(i=0; i