[icinga-checkins] icinga.org: icinga2/master: Build fix for OpenSSL 1.1.0

git at icinga.org git at icinga.org
Mon Jun 27 08:28:37 CEST 2016


Module: icinga2
Branch: master
Commit: 6de6ea5e420f50f680fd7ab7da9247fc89d7201b
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=6de6ea5e420f50f680fd7ab7da9247fc89d7201b

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon Jun 27 08:28:22 2016 +0200

Build fix for OpenSSL 1.1.0

fixes #12044

---

 lib/base/tlsutility.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/base/tlsutility.cpp b/lib/base/tlsutility.cpp
index 772b889..37f53b9 100644
--- a/lib/base/tlsutility.cpp
+++ b/lib/base/tlsutility.cpp
@@ -32,6 +32,7 @@ namespace icinga
 static bool l_SSLInitialized = false;
 static boost::mutex *l_Mutexes;
 
+#ifdef CRYPTO_LOCK
 static void OpenSSLLockingCallback(int mode, int type, const char *, int)
 {
 	if (mode & CRYPTO_LOCK)
@@ -48,6 +49,7 @@ static unsigned long OpenSSLIDCallback(void)
 	return (unsigned long)pthread_self();
 #endif /* _WIN32 */
 }
+#endif /* CRYPTO_LOCK */
 
 /**
  * Initializes the OpenSSL library.
@@ -62,9 +64,11 @@ void InitializeOpenSSL(void)
 
 	SSL_COMP_get_compression_methods();
 
+#ifdef CRYPTO_LOCK
 	l_Mutexes = new boost::mutex[CRYPTO_num_locks()];
 	CRYPTO_set_locking_callback(&OpenSSLLockingCallback);
 	CRYPTO_set_id_callback(&OpenSSLIDCallback);
+#endif /* CRYPTO_LOCK */
 
 	l_SSLInitialized = true;
 }



More information about the icinga-checkins mailing list