There was an error while loading. Please reload this page.
FICLONE
1 parent 8844197 commit 06656e2Copy full SHA for 06656e2
2 files changed
Misc/NEWS.d/next/Library/2024-07-31-15-08-42.gh-issue-116622.aKxIQA.rst
@@ -0,0 +1,2 @@
1
+On Android, the ``FICLONE`` and ``FICLONERANGE`` constants are no longer
2
+exposed by :mod:`fcntl`, as these ioctls are blocked by SELinux.
Modules/fcntlmodule.c
@@ -580,12 +580,17 @@ all_ins(PyObject* m)
580
#ifdef F_GETPIPE_SZ
581
if (PyModule_AddIntMacro(m, F_GETPIPE_SZ)) return -1;
582
#endif
583
+
584
+/* On Android, FICLONE is blocked by SELinux. */
585
+#ifndef __ANDROID__
586
#ifdef FICLONE
587
if (PyModule_AddIntMacro(m, FICLONE)) return -1;
588
589
#ifdef FICLONERANGE
590
if (PyModule_AddIntMacro(m, FICLONERANGE)) return -1;
591
592
+#endif
593
594
#ifdef F_GETOWN_EX
595
// since Linux 2.6.32
596
if (PyModule_AddIntMacro(m, F_GETOWN_EX)) return -1;
0 commit comments