summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/selectmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index c84c3cc..0f90ce2 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -4,6 +4,10 @@
have any value except INVALID_SOCKET.
*/
+#if defined(HAVE_POLL_H) && !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
+
#include "Python.h"
#include <structmember.h>
@@ -2452,6 +2456,10 @@ PyInit_select(void)
#ifdef POLLMSG
PyModule_AddIntMacro(m, POLLMSG);
#endif
+#ifdef POLLRDHUP
+ /* Kernel 2.6.17+ */
+ PyModule_AddIntMacro(m, POLLRDHUP);
+#endif
}
#endif /* HAVE_POLL */