summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2013-01-19 12:15:56 +0100
committerCharles-François Natali <cf.natali@gmail.com>2013-01-19 12:15:56 +0100
commita41cf29c0bb14ade2ef5ad8c172d25cb84433a49 (patch)
tree0a7325708e3069745b39a0b0cb104a98de7c80f7
parent74f49ab28b91d3c23524356230feb2724ee9b23f (diff)
downloadcpython-git-a41cf29c0bb14ade2ef5ad8c172d25cb84433a49.tar.gz
Issue #16953: Fix socket module compilation on platforms with HAVE_BROKEN_POLL.
Patch by Jeffrey Armstrong.
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/selectmodule.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index 6c1ce6822b..538f2c0106 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -35,6 +35,7 @@ Oliver Andrich
Ross Andrus
Heidi Annexstad
Éric Araujo
+Jeffrey Armstrong
Jason Asbahr
David Ascher
Chris AtLee
diff --git a/Misc/NEWS b/Misc/NEWS
index f7491d1843..11343e60da 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -700,6 +700,9 @@ Tests
Build
-----
+- Issue #16953: Fix socket module compilation on platforms with
+ HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
+
- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
- Issue #15923: fix a mistake in asdl_c.py that resulted in a TypeError after
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 61e101eb7d..650d9fe3fb 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -1737,7 +1737,7 @@ descriptors can be used.");
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 */
@@ -1769,7 +1769,7 @@ initselect(void)
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) {