From e5950b8af88f4fde4b0df89015535063d0a04b09 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 30 Jan 2018 11:39:39 +0100 Subject: [PATCH] bpo-28914: Fix compilation of select on Android EPOLL_CLOEXEC is not defined on Android. Co-Authored-By: Wataru Matsumoto --- Modules/selectmodule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index f2f5cc86cdbe511..3b7713abab3693c 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); }