]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Linux 2.6.26 and earlier will fail libevent's timerfd_create() call due to
authorDave Hart <hart@ntp.org>
Sat, 16 Jun 2012 04:51:53 +0000 (04:51 +0000)
committerDave Hart <hart@ntp.org>
Sat, 16 Jun 2012 04:51:53 +0000 (04:51 +0000)
  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

sntp/libevent/epoll.c

index edd4e18b480a4e3bb4ba499edea36f6763d6aa46..d132061f8174f23855c20a474158befda70beb45 100644 (file)
@@ -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;