Fix bad rebase for SSLContext
authorDave Watson <davejwatson@fb.com>
Fri, 31 Oct 2014 19:49:57 +0000 (12:49 -0700)
committerPavlo Kushnir <pavlo@fb.com>
Sat, 8 Nov 2014 02:26:22 +0000 (18:26 -0800)
Summary: Put back previous liger diffs

Test Plan: It builds

Reviewed By: seanc@fb.com

Subscribers: doug, ssl-diffs@, njormrod, folly-diffs@

FB internal diff: D1652754

Signature: t1:1652754:1414785984:df0fc7bf59dc2e89defd2c1a4ffe3b288238ba58

folly/io/async/SSLContext.cpp

index c50e257164924cc7106c605267d8a8b08c441ad5..6fcbeafac081b98772634812b57517b94bb95896 100644 (file)
@@ -21,7 +21,6 @@
 #include <openssl/ssl.h>
 #include <openssl/x509v3.h>
 
-#include <folly/SmallLocks.h>
 #include <folly/Format.h>
 #include <folly/io/PortableSpinLock.h>
 
@@ -547,7 +546,13 @@ static void callbackLocking(int mode, int n, const char*, int) {
 }
 
 static unsigned long callbackThreadID() {
-  return static_cast<unsigned long>(pthread_self());
+  return static_cast<unsigned long>(
+#ifdef __APPLE__
+    pthread_mach_thread_np(pthread_self())
+#else
+    pthread_self()
+#endif
+  );
 }
 
 static CRYPTO_dynlock_value* dyn_create(const char*, int) {