Skip to content

Commit 399235f

Browse files
committed
linux build fixes
Signed-off-by: Daniel A. Steffen <[email protected]>
1 parent 8f53fb3 commit 399235f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ void _dispatch_log(const char *msg, ...);
454454
* For reporting bugs within libdispatch when using the "_debug" version of the
455455
* library.
456456
*/
457-
#if __GNUC__
457+
#if __APPLE__
458458
#define dispatch_assert(e) do { \
459459
if (__builtin_constant_p(e)) { \
460460
dispatch_static_assert(e); \
@@ -472,7 +472,7 @@ static inline void _dispatch_assert(long e, long line) {
472472
#define dispatch_assert(e) _dispatch_assert((long)(e), __LINE__)
473473
#endif /* __GNUC__ */
474474

475-
#if __GNUC__
475+
#if __APPLE__
476476
/*
477477
* A lot of API return zero upon success and not-zero on fail. Let's capture
478478
* and log the non-zero value
@@ -491,7 +491,7 @@ static inline void _dispatch_assert(long e, long line) {
491491
static inline void _dispatch_assert_zero(long e, long line) {
492492
if (DISPATCH_DEBUG && e) _dispatch_abort(line, e);
493493
}
494-
#define dispatch_assert_zero(e) _dispatch_assert((long)(e), __LINE__)
494+
#define dispatch_assert_zero(e) _dispatch_assert_zero((long)(e), __LINE__)
495495
#endif /* __GNUC__ */
496496

497497
/*

src/queue.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4523,10 +4523,12 @@ _dispatch_return_to_kernel(void)
45234523
void
45244524
_dispatch_poll_for_events_4launchd(void)
45254525
{
4526+
#if DISPATCH_USE_KEVENT_WORKQUEUE
45264527
if (_dispatch_get_wlh()) {
45274528
dispatch_assert(_dispatch_deferred_items_get()->ddi_wlh_servicing);
45284529
_dispatch_event_loop_drain(KEVENT_FLAG_IMMEDIATE);
45294530
}
4531+
#endif
45304532
}
45314533

45324534
#if HAVE_PTHREAD_WORKQUEUE_NARROWING

0 commit comments

Comments
 (0)