aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-09-29 12:07:25 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-09-29 12:07:25 +0200
commit1b9d89cab3bb1df73c58ccd8528eafd21a8c6e40 (patch)
treea054585a16a4496c6195eb4a6ccd68f07559fbe4
parenta3ad5e775187ed04184f76e21cfbf44782f85561 (diff)
downloadliberty-1b9d89cab3bb1df73c58ccd8528eafd21a8c6e40.tar.gz
liberty-1b9d89cab3bb1df73c58ccd8528eafd21a8c6e40.tar.xz
liberty-1b9d89cab3bb1df73c58ccd8528eafd21a8c6e40.zip
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/
-rw-r--r--liberty.c7
1 files 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 <sys/types.h>
#include <sys/event.h>