From 360f7b02eb350a3836dfeddc89573b13cab4015d Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 10 Dec 2022 21:56:20 +0000 Subject: [PATCH] adding few more CLONE_* constant for Linux/Android. closes #3033. --- libc-test/build.rs | 1 + libc-test/semver/linux-gnu.txt | 4 +++- src/unix/linux_like/linux/gnu/mod.rs | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index eb0dcb89a58c5..8edb020b6b70f 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3841,6 +3841,7 @@ fn test_linux(target: &str) { | "MADV_POPULATE_READ" | "MADV_POPULATE_WRITE" if musl => true, + "CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true, // kernel 6.1 minimum "MADV_COLLAPSE" => true, diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt index 8f19e5866a72d..c37333b964046 100644 --- a/libc-test/semver/linux-gnu.txt +++ b/libc-test/semver/linux-gnu.txt @@ -32,6 +32,8 @@ BTRFS_SUPER_MAGIC CGROUP2_SUPER_MAGIC CGROUP_SUPER_MAGIC CLONE_NEWTIME +CLONE_CLEAR_SIGHAND +CLONE_INTO_CGROUP CODA_SUPER_MAGIC CRAMFS_MAGIC DEAD_PROCESS @@ -666,4 +668,4 @@ getmntent_r putpwent putgrent execveat -close_range \ No newline at end of file +close_range diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index f31f341e2e54d..175a49cd6696c 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -946,6 +946,8 @@ pub const ELFOSABI_ARM_AEABI: u8 = 64; // linux/sched.h pub const CLONE_NEWTIME: ::c_int = 0x80; +pub const CLONE_CLEAR_SIGHAND: ::c_int = 0x100000000; +pub const CLONE_INTO_CGROUP: ::c_int = 0x200000000; // linux/keyctl.h pub const KEYCTL_DH_COMPUTE: u32 = 23;