Skip to content

Commit

Permalink
bpo-28914: Fix compilation of select on Android (#5447)
Browse files Browse the repository at this point in the history
EPOLL_CLOEXEC is not defined on Android.

Co-Authored-By: Wataru Matsumoto <[email protected]>
  • Loading branch information
vstinner and kantan2015 authored Jan 30, 2018
1 parent 763f094 commit b8d9032
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Modules/selectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b8d9032

Please sign in to comment.