Skip to content

Commit e83f3aa

Browse files
committed
dispatch: exclude some mach_port_t usage
This removes some `mach_port_t` usage in the eventlink support. Additionally guard the inclusion of a mach header with `HAVE_MACH` to allow building on non-Apple platforms.
1 parent df1b727 commit e83f3aa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

os/eventlink_private.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ OS_EXPORT OS_OBJECT_WARN_UNUSED_RESULT
111111
int
112112
os_eventlink_activate(os_eventlink_t eventlink);
113113

114+
#if HAVE_MACH
114115
/*!
115116
* @function os_eventlink_extract_remote_port
116117
*
@@ -141,6 +142,7 @@ os_eventlink_extract_remote_port(os_eventlink_t eventlink, mach_port_t *port_out
141142
OS_EXPORT OS_OBJECT_RETURNS_RETAINED
142143
os_eventlink_t _Nullable
143144
os_eventlink_create_with_port(const char *name, mach_port_t mach_port);
145+
#endif
144146

145147
/*!
146148
* @function os_eventlink_create_remote_with_eventlink

src/internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ upcast(dispatch_object_t dou)
252252
#include "channel_private.h"
253253
#include "workloop_private.h"
254254
#include "source_private.h"
255+
#if HAVE_MACH
255256
#include "mach_private.h"
257+
#endif
256258
#include "data_private.h"
257259
#include "time_private.h"
258260
#include "os/voucher_private.h"

0 commit comments

Comments
 (0)