# 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 @@ -1748,7 +1748,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 */ @@ -1793,7 +1793,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) {