aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/hurd-broken-poll.diff
blob: 825e3fb1ef3d4922e86367a463b886c0fffcdcaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# DP: Fix build failure on hurd, working around poll() on systems
# DP: on which it returns an error on invalid FDs.

--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -1736,7 +1736,7 @@
 
 static PyMethodDef select_methods[] = {
     {"select",          select_select,  METH_VARARGS,   select_doc},
-#ifdef HAVE_POLL
+#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)
     {"poll",            select_poll,    METH_NOARGS,    poll_doc},
 #endif /* HAVE_POLL */
     {0,         0},     /* sentinel */
@@ -1768,7 +1768,7 @@
     PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF);
 #endif
 
-#if defined(HAVE_POLL)
+#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)
 #ifdef __APPLE__
     if (select_have_broken_poll()) {
         if (PyObject_DelAttrString(m, "poll") == -1) {