aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-09-09 13:10:22 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-09-09 13:10:22 -0700
commit5d3f2e628606c14904063d0347999f89ce779354 (patch)
treea53c8d9ed9f1d0a471d20b73ecbdf4746711faa3 /include
parent8f416dbb9793473d32020a108133235ec147e5df (diff)
parent1c8bbc410612cf0b862598251ada8858803b5eb8 (diff)
Merge github.com:grpc/grpc into grand-unified-closures
Diffstat (limited to 'include')
-rw-r--r--include/grpc/impl/codegen/port_platform.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index 7c67bad5ae..f97e386289 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -234,6 +234,7 @@
#define GPR_ARCH_32 1
#endif /* _LP64 */
#elif defined(__APPLE__)
+#include <Availability.h>
#include <TargetConditionals.h>
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
@@ -246,8 +247,18 @@
#define GPR_PTHREAD_TLS 1
#else /* TARGET_OS_IPHONE */
#define GPR_PLATFORM_STRING "osx"
+#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7
+#define GPR_CPU_IPHONE 1
+#define GPR_PTHREAD_TLS 1
+#else /* __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7 */
+#define GPR_CPU_POSIX 1
+#define GPR_GCC_TLS 1
+#endif
+#else /* __MAC_OS_X_VERSION_MIN_REQUIRED */
#define GPR_CPU_POSIX 1
#define GPR_GCC_TLS 1
+#endif
#define GPR_POSIX_CRASH_HANDLER 1
#endif
#define GPR_GCC_ATOMIC 1