From 9222a2d02495fb3b9b2868b2e31938e990ab7999 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Fri, 21 Nov 2014 11:00:42 -0800 Subject: [PATCH] Fixed iOS build caused by GetThreadList feature. Summary: Fixed iOS build caused by GetThreadList feature. --- util/thread_status_impl.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/thread_status_impl.h b/util/thread_status_impl.h index a76c02b09..a678e0988 100644 --- a/util/thread_status_impl.h +++ b/util/thread_status_impl.h @@ -131,10 +131,10 @@ class ThreadStatusImpl { bool check_exist); protected: - // The thread-local variable for storing thread status. - static __thread ThreadStatusData* thread_status_data_; #if ROCKSDB_USING_THREAD_STATUS + // The thread-local variable for storing thread status. + static __thread ThreadStatusData* thread_status_data_; // Obtain the pointer to the thread status data. It also performs // initialization when necessary. @@ -157,6 +157,8 @@ class ThreadStatusImpl { // associated to the same db_key faster. static std::unordered_map< const void*, std::unordered_set> db_key_map_; +#else + static ThreadStatusData* thread_status_data_; #endif // ROCKSDB_USING_THREAD_STATUS };