aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/impl/codegen/port_platform.h
diff options
context:
space:
mode:
authorGravatar Frank Groeneveld <frank@ivaldi.nl>2017-10-12 08:27:14 +0200
committerGravatar Mehrdad Afshari <mmx@google.com>2017-10-12 13:50:38 -0700
commitfbf8128da8ea1dd55729c957e915afedb8754f0d (patch)
treeea210d23f7147f849e6d807a2c827006ba549bea /include/grpc/impl/codegen/port_platform.h
parent1ddeeb9b9e7385d85642c7f9ac3f50a6ddcef910 (diff)
Add OpenBSD support
Diffstat (limited to 'include/grpc/impl/codegen/port_platform.h')
-rw-r--r--include/grpc/impl/codegen/port_platform.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index baea4bcf52..fb4bfc3162 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -241,6 +241,29 @@
#else /* _LP64 */
#define GPR_ARCH_32 1
#endif /* _LP64 */
+#elif defined(__OpenBSD__)
+#define GPR_PLATFORM_STRING "openbsd"
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+#define GPR_OPENBSD 1
+#define GPR_CPU_POSIX 1
+#define GPR_GCC_ATOMIC 1
+#define GPR_GCC_TLS 1
+#define GPR_POSIX_LOG 1
+#define GPR_POSIX_ENV 1
+#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STRING 1
+#define GPR_POSIX_SUBPROCESS 1
+#define GPR_POSIX_SYNC 1
+#define GPR_POSIX_TIME 1
+#define GPR_GETPID_IN_UNISTD_H 1
+#define GPR_SUPPORT_CHANNELS_FROM_FD 1
+#ifdef _LP64
+#define GPR_ARCH_64 1
+#else /* _LP64 */
+#define GPR_ARCH_32 1
+#endif /* _LP64 */
#elif defined(__native_client__)
#define GPR_PLATFORM_STRING "nacl"
#ifndef _BSD_SOURCE