]> granicus.if.org Git - libevent/commitdiff
Do not offer EV_FEATURE_EARLY_CLOSE if we have no EPOLLRDHUP
authorNick Mathewson <nickm@torproject.org>
Mon, 24 Feb 2014 20:07:38 +0000 (15:07 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 24 Feb 2014 20:07:38 +0000 (15:07 -0500)
epoll.c

diff --git a/epoll.c b/epoll.c
index 44c787d8a2e6e6c89e2ac65042f4745b2f75300e..aa41f84e027e30876dd282ea7e733c38a093d171 100644 (file)
--- 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
 };