summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/ev.c b/ev.c
index c6a0e97..88e3474 100644
--- a/ev.c
+++ b/ev.c
@@ -810,11 +810,20 @@ loop_init (EV_P_ unsigned int flags)
now_floor = mn_now;
rtmn_diff = ev_rt_now - mn_now;
- if (!(flags & EVFLAG_NOENV) && !enable_secure () && getenv ("LIBEV_FLAGS"))
+ if (!(flags & EVFLAG_NOENV)
+ && !enable_secure ()
+ && getenv ("LIBEV_FLAGS"))
flags = atoi (getenv ("LIBEV_FLAGS"));
- if (!(flags & 0x0000ffff))
- flags |= 0x0000ffff;
+ if (!(flags & EVMETHOD_ALL))
+ {
+ flags |= EVMETHOD_ALL;
+#if EV_USE_KQUEUE && !defined (__NetBSD__)
+ /* kqueue is borked on everything but netbsd apparently */
+ /* it usually doesn't work correctly on anything but sockets and pipes */
+ flags &= ~EVMETHOD_KQUEUE;
+#endif
+ }
method = 0;
#if EV_USE_PORT