浏览代码

define no_threadlocal on OpenBSD

ramrunner 9 年之前
父节点
当前提交
bfc1299a09
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/google/protobuf/stubs/platform_macros.h

+ 2 - 2
src/google/protobuf/stubs/platform_macros.h

@@ -114,11 +114,11 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
 
 
 #undef GOOGLE_PROTOBUF_PLATFORM_ERROR
 #undef GOOGLE_PROTOBUF_PLATFORM_ERROR
 
 
-#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE)
+#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__)
 // Android ndk does not support the __thread keyword very well yet. Here
 // Android ndk does not support the __thread keyword very well yet. Here
 // we use pthread_key_create()/pthread_getspecific()/... methods for
 // we use pthread_key_create()/pthread_getspecific()/... methods for
 // TLS support on android.
 // TLS support on android.
-// iOS also does not support the __thread keyword.
+// iOS and OpenBSD also do not support the __thread keyword.
 #define GOOGLE_PROTOBUF_NO_THREADLOCAL
 #define GOOGLE_PROTOBUF_NO_THREADLOCAL
 #endif
 #endif