Skip to content

Commit f88e80d

Browse files
committed
os.c: use NOTE_TRIGGER conditionally, use EV_TRIGGER as a fallback
1 parent 49a1f78 commit f88e80d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/os.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,11 @@ void soundio_os_cond_signal(struct SoundIoOsCond *cond,
419419
memset(&kev, 0, sizeof(kev));
420420
kev.ident = notify_ident;
421421
kev.filter = EVFILT_USER;
422+
#if defined(NOTE_TRIGGER)
422423
kev.fflags = NOTE_TRIGGER;
424+
#elif defined(EV_TRIGGER)
425+
kev.flags = EV_TRIGGER;
426+
#endif
423427

424428
if (kevent(cond->kq_id, &kev, 1, NULL, 0, &timeout) == -1) {
425429
if (errno == EINTR)

0 commit comments

Comments
 (0)