Skip to content

Commit 004a9be

Browse files
committed
RunLoop: define mac_port_t for non-Darwin targets
If `dispatch/private.h` is not available, then we fall back to forward declaring dispatch interfaces. One of those is the `mach_port_t` shim typedef.
1 parent 810f5d5 commit 004a9be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CoreFoundation/RunLoop.subproj/CFRunLoop.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ CF_INLINE uint64_t check_uint64_add(uint64_t x, uint64_t y, int32_t* err) {
6262
#else
6363
extern dispatch_queue_t _dispatch_runloop_root_queue_create_4CF(const char *_Nullable label, unsigned long flags);
6464
#if USE_DISPATCH_SOURCE_FOR_TIMERS
65+
#if !TARGET_OS_MAC
66+
typedef uint32_t mach_port_t;
67+
#endif
6568
extern mach_port_t _dispatch_runloop_root_queue_get_port_4CF(dispatch_queue_t queue);
6669
#endif
6770
extern void _dispatch_source_set_runloop_timer_4CF(dispatch_source_t source, dispatch_time_t start, uint64_t interval, uint64_t leeway);

0 commit comments

Comments
 (0)