aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@gmail.com>2018-06-20 13:02:16 -0700
committerGravatar GitHub <noreply@github.com>2018-06-20 13:02:16 -0700
commit85ba13c9bfbed5ab97b28fe7284f1267cc5fd9c1 (patch)
tree806c2a55730a07d2099551818b17047fcebb3382 /src
parente3ea413ab076c8f6250efe32e1c793c90e8e3992 (diff)
parent9298471e12416e2c65a4c471493c2367e1637176 (diff)
Merge pull request #1261 from gjasny/disable-tls-for-osx-10.6
Disable thread local storage for OSX < 10.7
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/stubs/platform_macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h
index c3a64dd2..ff4dea7b 100644
--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -99,6 +99,7 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
#if defined(__APPLE__)
#define GOOGLE_PROTOBUF_OS_APPLE
+#include <Availability.h>
#include <TargetConditionals.h>
#if TARGET_OS_IPHONE
#define GOOGLE_PROTOBUF_OS_IPHONE
@@ -125,4 +126,9 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
#define GOOGLE_PROTOBUF_NO_THREADLOCAL
#endif
+#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+// __thread keyword requires at least 10.7
+#define GOOGLE_PROTOBUF_NO_THREADLOCAL
+#endif
+
#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_