kqueue: Add a no-op EV_ENABLE definition.

EV_ADD implies ENABLE, so this isn't needed, but a lot of applications
try to specify it anyway. So this extends source compatibility.

If in the future we ever implement EV_DISABLE, we can just add a
real definition for it then, and since ADD implies ENABLE existing
applications shouldn't break.
This commit is contained in:
Augustin Cavalier
2026-03-26 12:25:41 -04:00
parent 5ac1c21e5f
commit bb1c367a6d
+1
View File
@@ -86,6 +86,7 @@ struct kevent {
/* actions */
#define EV_ADD 0x0001 /* add event to kq (implies enable) */
#define EV_DELETE 0x0002 /* delete event from kq */
#define EV_ENABLE (0) /* (not needed) */
/* flags */
#define EV_ONESHOT 0x0010 /* only report one occurrence */