Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
On Android, the ``FICLONE`` and ``FICLONERANGE`` constants are no longer
exposed by :mod:`fcntl`, as these ioctls are blocked by SELinux.
5 changes: 5 additions & 0 deletions Modules/fcntlmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,17 @@ all_ins(PyObject* m)
#ifdef F_GETPIPE_SZ
if (PyModule_AddIntMacro(m, F_GETPIPE_SZ)) return -1;
#endif

/* On Android, FICLONE is blocked by SELinux. */
#ifndef __ANDROID__
#ifdef FICLONE
if (PyModule_AddIntMacro(m, FICLONE)) return -1;
#endif
#ifdef FICLONERANGE
if (PyModule_AddIntMacro(m, FICLONERANGE)) return -1;
#endif
#endif

#ifdef F_GETOWN_EX
// since Linux 2.6.32
if (PyModule_AddIntMacro(m, F_GETOWN_EX)) return -1;
Expand Down
Loading