From: Nick Mathewson Date: Mon, 24 Feb 2014 20:07:38 +0000 (-0500) Subject: Do not offer EV_FEATURE_EARLY_CLOSE if we have no EPOLLRDHUP X-Git-Tag: release-2.1.4-alpha~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3908a5e3d0ebc310f1f258c5e8994cf71d3b011a;p=libevent Do not offer EV_FEATURE_EARLY_CLOSE if we have no EPOLLRDHUP --- diff --git a/epoll.c b/epoll.c index 44c787d8..aa41f84e 100644 --- a/epoll.c +++ b/epoll.c @@ -65,6 +65,9 @@ */ #if !defined(EPOLLRDHUP) #define EPOLLRDHUP 0 +#define EARLY_CLOSE_IF_HAVE_RDHUP 0 +#else +#define EARLY_CLOSE_IF_HAVE_RDHUP EV_FEATURE_EARLY_CLOSE #endif #include "epolltable-internal.h" @@ -101,7 +104,7 @@ static const struct eventop epollops_changelist = { epoll_dispatch, epoll_dealloc, 1, /* need reinit */ - EV_FEATURE_ET|EV_FEATURE_O1|EV_FEATURE_EARLY_CLOSE, + EV_FEATURE_ET|EV_FEATURE_O1| EARLY_CLOSE_IF_HAVE_RDHUP, EVENT_CHANGELIST_FDINFO_SIZE };