bpo-28914: Fix compilation of select on Android (#5447)
EPOLL_CLOEXEC is not defined on Android. Co-Authored-By: Wataru Matsumoto <sxsns243@gmail.com>
This commit is contained in:
parent
763f094b1f
commit
b8d90328ad
|
@ -1307,10 +1307,13 @@ pyepoll_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
PyErr_SetString(PyExc_ValueError, "negative sizehint");
|
PyErr_SetString(PyExc_ValueError, "negative sizehint");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_EPOLL_CREATE1
|
||||||
if (flags && flags != EPOLL_CLOEXEC) {
|
if (flags && flags != EPOLL_CLOEXEC) {
|
||||||
PyErr_SetString(PyExc_OSError, "invalid flags");
|
PyErr_SetString(PyExc_OSError, "invalid flags");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return newPyEpoll_Object(type, sizehint, -1);
|
return newPyEpoll_Object(type, sizehint, -1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue