aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/hurd-broken-poll.diff
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python2.7/patches/hurd-broken-poll.diff')
-rw-r--r--examples/python2.7/patches/hurd-broken-poll.diff23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/python2.7/patches/hurd-broken-poll.diff b/examples/python2.7/patches/hurd-broken-poll.diff
new file mode 100644
index 0000000..825e3fb
--- /dev/null
+++ b/examples/python2.7/patches/hurd-broken-poll.diff
@@ -0,0 +1,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) {