diff --git a/util/thread_local.h b/util/thread_local.h index 3777ad60d..b935208f1 100644 --- a/util/thread_local.h +++ b/util/thread_local.h @@ -18,8 +18,12 @@ #include "util/autovector.h" #include "port/port.h" -#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(IOS_CROSS_COMPILE) -#define ROCKSDB_SUPPORT_THREAD_LOCAL +#ifndef ROCKSDB_SUPPORT_THREAD_LOCAL +# if defined(OS_WIN) || defined(OS_MACOSX) || defined(IOS_CROSS_COMPILE) +# define ROCKSDB_SUPPORT_THREAD_LOCAL 0 +# else +# define ROCKSDB_SUPPORT_THREAD_LOCAL 1 +# endif #endif namespace rocksdb {