[Python-checkins] bpo-28914: Fix compilation of select on Android (#5447)

Victor Stinner webhook-mailer at python.org
Tue Jan 30 06:18:57 EST 2018


https://github.com/python/cpython/commit/b8d90328ad2abc9d6d2c9b8ce769fb82b18bbc10
commit: b8d90328ad2abc9d6d2c9b8ce769fb82b18bbc10
branch: master
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-01-30T12:18:54+01:00
summary:

bpo-28914: Fix compilation of select on Android (#5447)

EPOLL_CLOEXEC is not defined on Android.

Co-Authored-By: Wataru Matsumoto <sxsns243 at gmail.com>

files:
M Modules/selectmodule.c

diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index f2f5cc86cdbe..3b7713abab36 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -1307,10 +1307,13 @@ pyepoll_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
         PyErr_SetString(PyExc_ValueError, "negative sizehint");
         return NULL;
     }
+
+#ifdef HAVE_EPOLL_CREATE1
     if (flags && flags != EPOLL_CLOEXEC) {
         PyErr_SetString(PyExc_OSError, "invalid flags");
         return NULL;
     }
+#endif
 
     return newPyEpoll_Object(type, sizehint, -1);
 }



More information about the Python-checkins mailing list