summaryrefslogtreecommitdiff
path: root/epoll.c
diff options
context:
space:
mode:
authorDave Hart <hart@ntp.org>2012-06-18 10:31:38 -0400
committerNick Mathewson <nickm@torproject.org>2012-06-18 10:31:38 -0400
commit1aaf9f013beef06680d8e6512eb6426ab70f6ba2 (patch)
tree66544d0bca3f6e93d40f79af99942eb585e2a89b /epoll.c
parente7bf4c84afd7961eb92a2d6583c84b56a87f2555 (diff)
downloadlibevent-1aaf9f013beef06680d8e6512eb6426ab70f6ba2.tar.gz
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)
Diffstat (limited to 'epoll.c')
-rw-r--r--epoll.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/epoll.c b/epoll.c
index edd4e18b..91f0544b 100644
--- a/epoll.c
+++ b/epoll.c
@@ -190,7 +190,14 @@ epoll_init(struct event_base *base)
epollop->timerfd = -1;
}
} else {
- event_warn("timerfd_create");
+ 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");
+ }
+ epollop->timerfd = -1;
}
} else {
epollop->timerfd = -1;