diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2016-02-19 10:11:04 +0100 |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2016-02-19 10:11:04 +0100 |
commit | 9298471e12416e2c65a4c471493c2367e1637176 (patch) | |
tree | 40dbe052c3d8d4ec00ce79fa681d4ddbde6a54aa /src/google | |
parent | c003abb40d64ecd6694fab239d3fc126b31eee0d (diff) | |
download | protobuf-9298471e12416e2c65a4c471493c2367e1637176.tar.gz protobuf-9298471e12416e2c65a4c471493c2367e1637176.tar.bz2 protobuf-9298471e12416e2c65a4c471493c2367e1637176.zip |
Disable thread local storage for OSX < 10.7
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/stubs/platform_macros.h | 6 |
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 22b35723..980c54b2 100644 --- a/src/google/protobuf/stubs/platform_macros.h +++ b/src/google/protobuf/stubs/platform_macros.h @@ -93,6 +93,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 @@ -119,4 +120,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_ |