util/thread_local.h: silence a clang-build warning

Summary:
otherwise clang complains with

/home/jenkins/workspace/ceph-master/src/rocksdb/util/thread_local.h:205:5:
error: macro expansion producing 'defined' has undefined behavior
[-Werror,-Wexpansion-to-defined]
^
/home/jenkins/workspace/ceph-master/src/rocksdb/util/thread_local.h:22:4:
note: expanded from macro 'ROCKSDB_SUPPORT_THREAD_LOCAL'
!defined(OS_WIN) && !defined(OS_MACOSX) && !defined(IOS_CROSS_COMPILE)
^`

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Closes https://github.com/facebook/rocksdb/pull/1757

Differential Revision: D4394140

Pulled By: siying

fbshipit-source-id: f0beda0
This commit is contained in:
Kefu Chai 2017-01-15 13:19:17 -08:00 committed by Facebook Github Bot
parent 324a0f988e
commit e8a096000b

View File

@ -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 {