Skip to content

Commit

Permalink
adding few more CLONE_* constant for Linux/Android.
Browse files Browse the repository at this point in the history
closes #3033.
  • Loading branch information
devnexen committed Dec 14, 2022
1 parent 6a5c07f commit ff7fb85
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libc-test/build.rs
Expand Up @@ -3368,6 +3368,8 @@ fn test_linux(target: &str) {
if sparc64 => true,
// Added in Linux 5.13
"PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true,
// Added in linux 5.6
"CLONE_NUMTIME" => true,

_ => false,
}
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/android.txt
Expand Up @@ -206,15 +206,18 @@ CLOCK_TAI
CLOCK_THREAD_CPUTIME_ID
CLONE_CHILD_CLEARTID
CLONE_CHILD_SETTID
CLONE_CLEAR_SIGHAND
CLONE_DETACHED
CLONE_FILES
CLONE_FS
CLONE_INTO_CGROUP
CLONE_IO
CLONE_NEWCGROUP
CLONE_NEWIPC
CLONE_NEWNET
CLONE_NEWNS
CLONE_NEWPID
CLONE_NEWTIME
CLONE_NEWUSER
CLONE_NEWUTS
CLONE_PARENT
Expand Down
4 changes: 3 additions & 1 deletion libc-test/semver/linux-gnu.txt
Expand Up @@ -31,6 +31,8 @@ BPF_FS_MAGIC
BTRFS_SUPER_MAGIC
CGROUP2_SUPER_MAGIC
CGROUP_SUPER_MAGIC
CLONE_CLEAR_SIGHAND
CLONE_INTO_CGROUP
CODA_SUPER_MAGIC
CRAMFS_MAGIC
DCCP_SERVICE_LIST_MAX_LEN
Expand Down Expand Up @@ -660,4 +662,4 @@ strftime
strptime
dirname
posix_basename
gnu_basename
gnu_basename
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -264,6 +264,7 @@ CLONE_NEWIPC
CLONE_NEWNET
CLONE_NEWNS
CLONE_NEWPID
CLONE_NEWTIME
CLONE_NEWUSER
CLONE_NEWUTS
CLONE_PARENT
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/android/mod.rs
Expand Up @@ -2715,7 +2715,10 @@ pub const SCHED_DEADLINE: ::c_int = 6;

pub const SCHED_RESET_ON_FORK: ::c_int = 0x40000000;

pub const CLONE_NEWTIME: ::c_int = 0x80;
pub const CLONE_PIDFD: ::c_int = 0x1000;
pub const CLONE_CLEAR_SIGHAND: ::c_longlong = 0x100000000;
pub const CLONE_INTO_CGROUP: ::c_longlong = 0x200000000;

// linux/mempolicy.h
pub const MPOL_DEFAULT: ::c_int = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -1117,6 +1117,9 @@ pub const REG_STARTEND: ::c_int = 4;
pub const REG_EEND: ::c_int = 14;
pub const REG_ESIZE: ::c_int = 15;
pub const REG_ERPAREN: ::c_int = 16;
pub const CLONE_NEWTIME: ::c_int = 0x80;
pub const CLONE_CLEAR_SIGHAND: ::c_longlong = 0x100000000;
pub const CLONE_INTO_CGROUP: ::c_longlong = 0x200000000;

extern "C" {
pub fn fgetspent_r(
Expand Down

0 comments on commit ff7fb85

Please sign in to comment.