Fix build for no FOLLY_TLD_USE_FOLLY_TLS
authorMichael Lee <mzlee@fb.com>
Fri, 15 Apr 2016 00:20:26 +0000 (17:20 -0700)
committerFacebook Github Bot 5 <facebook-github-bot-5-bot@fb.com>
Fri, 15 Apr 2016 00:35:33 +0000 (17:35 -0700)
Summary: unique_ptr doesn't cast to void*

Reviewed By: andriigrynenko

Differential Revision: D3181346

fb-gh-sync-id: 5b912d2b5d46f3c9953b44d5ced7a8e1b4320678
fbshipit-source-id: 5b912d2b5d46f3c9953b44d5ced7a8e1b4320678

folly/detail/ThreadLocalDetail.cpp

index 9e7fda6828716589bd2507caeff6359a0493778b..4a8f2b66d2db0767785d1cbb10aa0cc871ea0430 100644 (file)
@@ -36,7 +36,7 @@ void StaticMetaBase::onThreadExit(void* ptr) {
 
   // Make sure this ThreadEntry is available if ThreadLocal A is accessed in
   // ThreadLocal B destructor.
-  pthread_setspecific(meta.pthreadKey_, threadEntry);
+  pthread_setspecific(meta.pthreadKey_, &(*threadEntry));
   SCOPE_EXIT {
     pthread_setspecific(meta.pthreadKey_, nullptr);
   };