From: Dave Hart Date: Sat, 16 Jun 2012 04:51:53 +0000 (+0000) Subject: Linux 2.6.26 and earlier will fail libevent's timerfd_create() call due to X-Git-Tag: NTP_4_2_7P284~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68697a60d6f899b098c5b8cacca2cd4bbc08b4d7;p=thirdparty%2Fntp.git Linux 2.6.26 and earlier will fail libevent's timerfd_create() call due to nonzero flags, yet some systems using that version have the nonworking flags in their header files (Debian Lenny). Do not spew warnings in regress output in that case, and set epollop->timerfd = -1. Suggested by Nick Mathewson. bk: 4fdc10e9ervVZiSwM2Xss5EkR3lSag --- diff --git a/sntp/libevent/epoll.c b/sntp/libevent/epoll.c index edd4e18b4..d132061f8 100644 --- a/sntp/libevent/epoll.c +++ b/sntp/libevent/epoll.c @@ -190,7 +190,10 @@ epoll_init(struct event_base *base) epollop->timerfd = -1; } } else { - event_warn("timerfd_create"); + if (EINVAL != errno && ENOSYS != errno) { + event_warn("timerfd_create"); + } + epollop->timerfd = -1; } } else { epollop->timerfd = -1;