From b1d30f9489771a295c1d9b06402e49a77b3e91e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9?= Date: Mon, 25 Nov 2024 16:42:38 -0500 Subject: [PATCH] kqueue: change EV_OOBAND to EVFILT_EXCEPT+NOTE_OOB (#4597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/libuv/libuv/issues/3947 Signed-off-by: Juan José Arboleda --- src/unix/kqueue.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/unix/kqueue.c b/src/unix/kqueue.c index e0166c34..b0962b97 100644 --- a/src/unix/kqueue.c +++ b/src/unix/kqueue.c @@ -37,17 +37,6 @@ #include #include -/* - * Required on - * - Until at least FreeBSD 11.0 - * - Older versions of Mac OS X - * - * http://www.boost.org/doc/libs/1_61_0/boost/asio/detail/kqueue_reactor.hpp - */ -#ifndef EV_OOBAND -#define EV_OOBAND EV_FLAG1 -#endif - static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags); @@ -231,7 +220,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { } if ((w->events & UV__POLLPRI) == 0 && (w->pevents & UV__POLLPRI) != 0) { - EV_SET(events + nevents, w->fd, EV_OOBAND, EV_ADD, 0, 0, 0); + EV_SET(events + nevents, w->fd, EVFILT_EXCEPT, EV_ADD, NOTE_OOB, 0, 0); if (++nevents == ARRAY_SIZE(events)) { if (kevent(loop->backend_fd, events, nevents, NULL, 0, NULL)) @@ -393,7 +382,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { revents |= UV__POLLRDHUP; } - if (ev->filter == EV_OOBAND) { + if (ev->filter == EVFILT_EXCEPT) { if (w->pevents & UV__POLLPRI) revents |= UV__POLLPRI; else