From 54a2e6452fbaed5a82e3b9a8504cf2850d4da191 Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Sun, 29 Nov 2015 16:58:15 +0100 Subject: THRIFT-3206 Fix Visual Studio build failure due 'pthread_self': identifier not found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch: Paweł Janicki --- lib/cpp/src/thrift/transport/TSSLSocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/cpp') diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp index 6e9a4de0f..8e5642678 100644 --- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp +++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp @@ -74,7 +74,11 @@ static void callbackLocking(int mode, int n, const char*, int) { #if (OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_NO_THREAD_ID) static unsigned long callbackThreadID() { +#ifdef _WIN32 + return (unsigned long)GetCurrentThreadId(); +#else return (unsigned long)pthread_self(); +#endif } #endif -- cgit v1.2.1