summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-07-19 18:09:26 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-07-19 18:09:26 (GMT)
commitfe8d9666575284c10b6bf803b9c446523da1d23a (patch)
tree4b982695184f9f5f7d073d6a12f7c2e5a0f3f190 /Modules
parenta1ea9c813f3adbab63392f6bfcb6a729ff272515 (diff)
downloadcpython-fe8d9666575284c10b6bf803b9c446523da1d23a.zip
cpython-fe8d9666575284c10b6bf803b9c446523da1d23a.tar.gz
cpython-fe8d9666575284c10b6bf803b9c446523da1d23a.tar.bz2
Issue #27567: Expose the POLLRDHUP constant in the select module
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 */