summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch')
-rw-r--r--meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch b/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch
new file mode 100644
index 000000000..8d7105667
--- /dev/null
+++ b/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch
@@ -0,0 +1,26 @@
1From cc4f32db13ddc62fbd1e316127c5a60f4080a2d3 Mon Sep 17 00:00:00 2001
2From: "James E. King, III" <jim.king@simplivity.com>
3Date: Thu, 29 Sep 2016 15:04:09 -0400
4Subject: [PATCH] THRIFT-3878: fix interop with newer OpenSSL libraries
5
6---
7 lib/cpp/src/thrift/transport/TSSLSocket.cpp | 5 +++++
8 1 file changed, 5 insertions(+)
9
10diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
11index 517151f714..1efb9f7a47 100644
12--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp
13+++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
14@@ -108,7 +108,12 @@ void initializeOpenSSL() {
15 SSL_library_init();
16 SSL_load_error_strings();
17 // static locking
18+ // newer versions of OpenSSL changed CRYPTO_num_locks - see THRIFT-3878
19+#ifdef CRYPTO_num_locks
20+ mutexes = boost::shared_array<Mutex>(new Mutex[CRYPTO_num_locks()]);
21+#else
22 mutexes = boost::shared_array<Mutex>(new Mutex[ ::CRYPTO_num_locks()]);
23+#endif
24 if (mutexes == NULL) {
25 throw TTransportException(TTransportException::INTERNAL_ERROR,
26 "initializeOpenSSL() failed, "