diff options
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.patch | 26 |
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 @@ | |||
1 | From cc4f32db13ddc62fbd1e316127c5a60f4080a2d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: "James E. King, III" <jim.king@simplivity.com> | ||
3 | Date: Thu, 29 Sep 2016 15:04:09 -0400 | ||
4 | Subject: [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 | |||
10 | diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp | ||
11 | index 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, " | ||