diff options
author | Frank Groeneveld <frank@ivaldi.nl> | 2017-10-12 08:27:14 +0200 |
---|---|---|
committer | Mehrdad Afshari <mmx@google.com> | 2017-10-12 13:50:38 -0700 |
commit | fbf8128da8ea1dd55729c957e915afedb8754f0d (patch) | |
tree | ea210d23f7147f849e6d807a2c827006ba549bea /src/core | |
parent | 1ddeeb9b9e7385d85642c7f9ac3f50a6ddcef910 (diff) |
Add OpenBSD support
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lib/iomgr/port.h | 10 | ||||
-rw-r--r-- | src/core/lib/support/time_posix.cc | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 42033d0ba4..1cc6d98491 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -109,6 +109,16 @@ #define GRPC_POSIX_SOCKETUTILS 1 #define GRPC_POSIX_WAKEUP_FD 1 #define GRPC_TIMER_USE_GENERIC 1 +#elif defined(GPR_OPENBSD) +#define GRPC_HAVE_IFADDRS 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_NACL) #define GRPC_HAVE_ARPA_NAMESER 1 #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 diff --git a/src/core/lib/support/time_posix.cc b/src/core/lib/support/time_posix.cc index 3267ea6b54..3f8a9094fd 100644 --- a/src/core/lib/support/time_posix.cc +++ b/src/core/lib/support/time_posix.cc @@ -42,7 +42,7 @@ static struct timespec timespec_from_gpr(gpr_timespec gts) { return rv; } -#if _POSIX_TIMERS > 0 +#if _POSIX_TIMERS > 0 || defined(__OpenBSD__) static gpr_timespec gpr_from_timespec(struct timespec ts, gpr_clock_type clock_type) { /* |