From: Joakim Soderberg Date: Mon, 17 Feb 2014 12:43:10 +0000 (+0000) Subject: BUGFIX: Fix compilation on systems with EPOLLRDHUP undefined. X-Git-Tag: release-2.1.4-alpha~27^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff26633226e1e81ef08566d91e92144c4b5a68c0;p=libevent BUGFIX: Fix compilation on systems with EPOLLRDHUP undefined. Since epolltable-internal.h uses this define, it must be defined before that is included. --- diff --git a/epoll.c b/epoll.c index 41a2a120..44c787d8 100644 --- a/epoll.c +++ b/epoll.c @@ -59,6 +59,14 @@ #include "evmap-internal.h" #include "changelist-internal.h" #include "time-internal.h" + +/* Since Linux 2.6.17, epoll is able to report about peer half-closed connection + using special EPOLLRDHUP flag on a read event. +*/ +#if !defined(EPOLLRDHUP) +#define EPOLLRDHUP 0 +#endif + #include "epolltable-internal.h" #if defined(EVENT__HAVE_SYS_TIMERFD_H) && \ @@ -72,13 +80,6 @@ #define USING_TIMERFD #endif -/* Since Linux 2.6.17, epoll is able to report about peer half-closed connection - using special EPOLLRDHUP flag on a read event. -*/ -#if !defined(EPOLLRDHUP) -#define EPOLLRDHUP 0 -#endif - struct epollop { struct epoll_event *events; int nevents;