diff options
author | root <root> | 2010-03-27 02:26:27 +0000 |
---|---|---|
committer | root <root> | 2010-03-27 02:26:27 +0000 |
commit | 211bdfec955fb41eb57d90de71bf4b2f4bd935d9 (patch) | |
tree | da2e2074a260752d744ecc71f39bc628651fa3d2 /ev_kqueue.c | |
parent | 2a3e4b8fa36efec935b58f217f396d35e28c45c3 (diff) |
*** empty log message ***
Diffstat (limited to 'ev_kqueue.c')
-rw-r--r-- | ev_kqueue.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ev_kqueue.c b/ev_kqueue.c index 53f2dc1..8e46c2a 100644 --- a/ev_kqueue.c +++ b/ev_kqueue.c @@ -52,6 +52,10 @@ kqueue_change (EV_P_ int fd, int filter, int flags, int fflags) EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0); } +/* OS X at least needs this */ +#ifndef EV_ENABLE +# define EV_ENABLE 0 +#endif #ifndef NOTE_EOF # define NOTE_EOF 0 #endif @@ -72,10 +76,10 @@ kqueue_modify (EV_P_ int fd, int oev, int nev) /* event requests even when oev == nev */ if (nev & EV_READ) - kqueue_change (EV_A_ fd, EVFILT_READ , EV_ADD, NOTE_EOF); + kqueue_change (EV_A_ fd, EVFILT_READ , EV_ADD | EV_ENABLE, NOTE_EOF); if (nev & EV_WRITE) - kqueue_change (EV_A_ fd, EVFILT_WRITE, EV_ADD, NOTE_EOF); + kqueue_change (EV_A_ fd, EVFILT_WRITE, EV_ADD | EV_ENABLE, NOTE_EOF); } static void |