From 1b9d89cab3bb1df73c58ccd8528eafd21a8c6e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 29 Sep 2021 12:07:25 +0200 Subject: [PATCH] Use kqueue on Darwin as well Since poll() is implemented in terms of kqueue() there, it doesn't seem like this could have improved anything. Besides man 3 ev, libevent code, and [1], I haven't managed to find much relevant information. [1] https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/ --- liberty.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/liberty.c b/liberty.c index 506793e..1655bfa 100644 --- a/liberty.c +++ b/liberty.c @@ -1749,10 +1749,9 @@ poller_run (struct poller *self) self->revents_len = 0; } -#elif defined (BSD) - -// Mac OS X's kqueue is fatally broken, or so I've been told; leaving it out. -// Otherwise this is sort of similar to the epoll version. +// Sort of similar to the epoll version. Let's hope Darwin isn't broken, +// that'd mean reimplementing this in terms of select() just because of Crapple. +#elif defined (BSD) || defined (__APPLE__) #include #include