From d455013b571db176aef52fc48a2d56eb5e5ae10a Mon Sep 17 00:00:00 2001 From: Gary Date: Tue, 26 Sep 2017 22:40:25 -0700 Subject: [PATCH] Fixed compilation errors with clang 9. --- cpp/src/plasma/common.h | 8 ++++++++ cpp/src/plasma/io.h | 8 ++++++++ cpp/src/plasma/plasma.h | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/cpp/src/plasma/common.h b/cpp/src/plasma/common.h index 66d5f3069d0..cfac11cd044 100644 --- a/cpp/src/plasma/common.h +++ b/cpp/src/plasma/common.h @@ -29,6 +29,14 @@ #include "arrow/status.h" #include "arrow/util/logging.h" +#ifndef _MACH_PORT_T +#define _MACH_PORT_T +#include /* __darwin_mach_port_t */ +typedef __darwin_mach_port_t mach_port_t; +#include +mach_port_t pthread_mach_thread_np(pthread_t); +#endif /* _MACH_PORT_T */ + namespace plasma { constexpr int64_t kUniqueIDSize = 20; diff --git a/cpp/src/plasma/io.h b/cpp/src/plasma/io.h index ef96c06ccea..fc98ee74e4a 100644 --- a/cpp/src/plasma/io.h +++ b/cpp/src/plasma/io.h @@ -28,6 +28,14 @@ #include "arrow/status.h" +#ifndef _MACH_PORT_T +#define _MACH_PORT_T +#include /* __darwin_mach_port_t */ +typedef __darwin_mach_port_t mach_port_t; +#include +mach_port_t pthread_mach_thread_np(pthread_t); +#endif /* _MACH_PORT_T */ + // TODO(pcm): Replace our own custom message header (message type, // message length, plasma protocol verion) with one that is serialized // using flatbuffers. diff --git a/cpp/src/plasma/plasma.h b/cpp/src/plasma/plasma.h index 476002f68c0..e67d444978e 100644 --- a/cpp/src/plasma/plasma.h +++ b/cpp/src/plasma/plasma.h @@ -36,6 +36,14 @@ #include "plasma/common.h" #include "plasma/common_generated.h" +#ifndef _MACH_PORT_T +#define _MACH_PORT_T +#include /* __darwin_mach_port_t */ +typedef __darwin_mach_port_t mach_port_t; +#include +mach_port_t pthread_mach_thread_np(pthread_t); +#endif /* _MACH_PORT_T */ + namespace plasma { #define HANDLE_SIGPIPE(s, fd_) \