Skip to content

Commit 0fee176

Browse files
committed
adding few more CLONE_* constant for Linux/Android.
closes #3033.
1 parent 6a5c07f commit 0fee176

File tree

6 files changed

+15
-1
lines changed

6 files changed

+15
-1
lines changed

libc-test/build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3368,6 +3368,8 @@ fn test_linux(target: &str) {
33683368
if sparc64 => true,
33693369
// Added in Linux 5.13
33703370
"PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true,
3371+
// Added in linux 5.6
3372+
"CLONE_NUMTIME" => true
33713373

33723374
_ => false,
33733375
}

libc-test/semver/android.txt

+3
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,18 @@ CLOCK_TAI
206206
CLOCK_THREAD_CPUTIME_ID
207207
CLONE_CHILD_CLEARTID
208208
CLONE_CHILD_SETTID
209+
CLONE_CLEAR_SIGHAND
209210
CLONE_DETACHED
210211
CLONE_FILES
211212
CLONE_FS
213+
CLONE_INTO_CGROUP
212214
CLONE_IO
213215
CLONE_NEWCGROUP
214216
CLONE_NEWIPC
215217
CLONE_NEWNET
216218
CLONE_NEWNS
217219
CLONE_NEWPID
220+
CLONE_NEWTIME
218221
CLONE_NEWUSER
219222
CLONE_NEWUTS
220223
CLONE_PARENT

libc-test/semver/linux-gnu.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ BPF_FS_MAGIC
3131
BTRFS_SUPER_MAGIC
3232
CGROUP2_SUPER_MAGIC
3333
CGROUP_SUPER_MAGIC
34+
CLONE_CLEAR_SIGHAND
35+
CLONE_INTO_CGROUP
3436
CODA_SUPER_MAGIC
3537
CRAMFS_MAGIC
3638
DCCP_SERVICE_LIST_MAX_LEN
@@ -660,4 +662,4 @@ strftime
660662
strptime
661663
dirname
662664
posix_basename
663-
gnu_basename
665+
gnu_basename

libc-test/semver/linux.txt

+1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ CLONE_NEWIPC
264264
CLONE_NEWNET
265265
CLONE_NEWNS
266266
CLONE_NEWPID
267+
CLONE_NEWTIME
267268
CLONE_NEWUSER
268269
CLONE_NEWUTS
269270
CLONE_PARENT

src/unix/linux_like/android/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,10 @@ pub const SCHED_DEADLINE: ::c_int = 6;
27152715

27162716
pub const SCHED_RESET_ON_FORK: ::c_int = 0x40000000;
27172717

2718+
pub const CLONE_NEWTIME: ::c_int = 0x80;
27182719
pub const CLONE_PIDFD: ::c_int = 0x1000;
2720+
pub const CLONE_CLEAR_SIGHAND: ::c_longlong = 0x100000000;
2721+
pub const CLONE_INTO_CGROUP: ::c_longlong = 0x200000000;
27192722

27202723
// linux/mempolicy.h
27212724
pub const MPOL_DEFAULT: ::c_int = 0;

src/unix/linux_like/linux/gnu/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,9 @@ pub const REG_STARTEND: ::c_int = 4;
11171117
pub const REG_EEND: ::c_int = 14;
11181118
pub const REG_ESIZE: ::c_int = 15;
11191119
pub const REG_ERPAREN: ::c_int = 16;
1120+
pub const CLONE_NEWTIME: ::c_int = 0x80;
1121+
pub const CLONE_CLEAR_SIGHAND: ::c_longlong = 0x100000000;
1122+
pub const CLONE_INTO_CGROUP: ::c_longlong = 0x200000000;
11201123

11211124
extern "C" {
11221125
pub fn fgetspent_r(

0 commit comments

Comments
 (0)