aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/impl/codegen/port_platform.h
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-09-16 13:44:28 -0700
committerGravatar murgatroid99 <mlumish@google.com>2016-09-16 13:44:28 -0700
commitbcc60f75d4b152c4e2eb000bece542f052770bfc (patch)
tree34806913186d762d45d1014b2ea8c4d4d37188aa /include/grpc/impl/codegen/port_platform.h
parent232ca0275e9fb82fe7bb25b03fc2402e8c1ee815 (diff)
parentee43d7bbb11a36c91c6f1ebff6bf3da70b7546b2 (diff)
Merge branch 'master' into uv_core_transport
Diffstat (limited to 'include/grpc/impl/codegen/port_platform.h')
-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 ff8cd00e08..77c7af8f14 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -188,6 +188,7 @@
#define GPR_ARCH_32 1
#endif /* _LP64 */
#elif defined(__APPLE__)
+#include <Availability.h>
#include <TargetConditionals.h>
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
@@ -199,8 +200,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_APPLE 1