Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cpp/src/plasma/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
#include "arrow/status.h"
#include "arrow/util/logging.h"

#ifndef _MACH_PORT_T
#define _MACH_PORT_T
#include <sys/_types.h> /* __darwin_mach_port_t */
typedef __darwin_mach_port_t mach_port_t;
#include <pthread.h>
mach_port_t pthread_mach_thread_np(pthread_t);
#endif /* _MACH_PORT_T */

namespace plasma {

constexpr int64_t kUniqueIDSize = 20;
Expand Down
8 changes: 8 additions & 0 deletions cpp/src/plasma/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@

#include "arrow/status.h"

#ifndef _MACH_PORT_T
#define _MACH_PORT_T
#include <sys/_types.h> /* __darwin_mach_port_t */
typedef __darwin_mach_port_t mach_port_t;
#include <pthread.h>
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.
Expand Down
8 changes: 8 additions & 0 deletions cpp/src/plasma/plasma.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
#include "plasma/common.h"
#include "plasma/common_generated.h"

#ifndef _MACH_PORT_T
#define _MACH_PORT_T
#include <sys/_types.h> /* __darwin_mach_port_t */
typedef __darwin_mach_port_t mach_port_t;
#include <pthread.h>
mach_port_t pthread_mach_thread_np(pthread_t);
#endif /* _MACH_PORT_T */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be put in a common header?


namespace plasma {

#define HANDLE_SIGPIPE(s, fd_) \
Expand Down