From caba7148d060ed34f26148c73eaa85e01d91f917 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Thu, 14 Apr 2016 17:20:26 -0700 Subject: [PATCH] Fix build for no FOLLY_TLD_USE_FOLLY_TLS 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/detail/ThreadLocalDetail.cpp b/folly/detail/ThreadLocalDetail.cpp index 9e7fda68..4a8f2b66 100644 --- a/folly/detail/ThreadLocalDetail.cpp +++ b/folly/detail/ThreadLocalDetail.cpp @@ -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); }; -- 2.34.1