mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Avoid giving a spurious warning when timerfd support is unavailable
We forgot to do the obligatory "Check if there is no syscall there" dance when calling timerfd_create(). (Commit message by Nick)
This commit is contained in:
parent
e7bf4c84af
commit
1aaf9f013b
7
epoll.c
7
epoll.c
@ -190,8 +190,15 @@ epoll_init(struct event_base *base)
|
|||||||
epollop->timerfd = -1;
|
epollop->timerfd = -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (errno != EINVAL && errno != ENOSYS) {
|
||||||
|
/* These errors probably mean that we were
|
||||||
|
* compiled with timerfd/TFD_* support, but
|
||||||
|
* we're running on a kernel that lacks those.
|
||||||
|
*/
|
||||||
event_warn("timerfd_create");
|
event_warn("timerfd_create");
|
||||||
}
|
}
|
||||||
|
epollop->timerfd = -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
epollop->timerfd = -1;
|
epollop->timerfd = -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user