From 3908a5e3d0ebc310f1f258c5e8994cf71d3b011a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 24 Feb 2014 15:07:38 -0500 Subject: [PATCH] Do not offer EV_FEATURE_EARLY_CLOSE if we have no EPOLLRDHUP --- epoll.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epoll.c b/epoll.c index 44c787d8a2..aa41f84e02 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 };