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 Jul 10, 2023
1 parent 92e5d67 commit bd57e54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3789,6 +3789,7 @@ fn test_linux(target: &str) {
| "MADV_POPULATE_READ"
| "MADV_POPULATE_WRITE"
if musl => true,
"CLONE_NEWTIME" | "CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true,

// FIXME: Requires more recent kernel headers
| "IFLA_PARENT_DEV_NAME" // linux v5.13+
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
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
DEAD_PROCESS
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,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 bd57e54

Please sign in to comment.