mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Check for Mac OS X 10.4 kqueue bug properly
EV_ERROR is a bit in struct kevent::flags. Other bits may be set too. Actually we have osx builds on travis-ci, but it uses osx 10.9.5, and we don't have warnings there, since I guess that there is no OR'ing with previous flag in case of error, while in 10.12 there is OR. Fixes: #377 Fixes: #376 Link: https://crbug.com/626534 Link: https://travis-ci.org/libevent/libevent/jobs/141033429
This commit is contained in:
parent
8892f4cbef
commit
df6f99e5b5
2
kqueue.c
2
kqueue.c
@ -154,7 +154,7 @@ kq_init(struct event_base *base)
|
|||||||
if (kevent(kq,
|
if (kevent(kq,
|
||||||
kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
|
kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
|
||||||
(int)kqueueop->events[0].ident != -1 ||
|
(int)kqueueop->events[0].ident != -1 ||
|
||||||
kqueueop->events[0].flags != EV_ERROR) {
|
!(kqueueop->events[0].flags & EV_ERROR)) {
|
||||||
event_warn("%s: detected broken kqueue; not using.", __func__);
|
event_warn("%s: detected broken kqueue; not using.", __func__);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user