Skip to content

Commit

Permalink
Auto merge of #2737 - devnexen:pr_set_vma_linux, r=Amanieu
Browse files Browse the repository at this point in the history
Adds to PR_SET_VMA/PR_SET_VMA_ANON_NAME to Linux.
  • Loading branch information
bors committed Apr 3, 2022
2 parents 02bdb0a + 2798840 commit 962e262
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3314,6 +3314,8 @@ fn test_linux(target: &str) {
"FUSE_SUPER_MAGIC" => true,
// linux 5.12 min
"MPOL_F_NUMA_BALANCING" => true,
// linux 5.17 min
"PR_SET_VMA" | "PR_SET_VMA_ANON_NAME" => true,

_ => false,
}
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 @@ -356,6 +356,8 @@ O_FSYNC
PF_IB
PF_MPLS
PF_XDP
PR_SET_VMA
PR_SET_VMA_ANON_NAME
PROC_SUPER_MAGIC
PTHREAD_MUTEX_ADAPTIVE_NP
PTRACE_GET_SYSCALL_INFO
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ LIO_WRITE
PF_IB
PF_MPLS
PF_XDP
PR_SET_VMA
PR_SET_VMA_ANON_NAME
adjtimex
aio_cancel
aio_error
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,9 @@ pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;

pub const PR_SET_VMA: ::c_int = 0x53564d41;
pub const PR_SET_VMA_ANON_NAME: ::c_int = 0;

pub const GRND_NONBLOCK: ::c_uint = 0x0001;
pub const GRND_RANDOM: ::c_uint = 0x0002;

Expand Down

0 comments on commit 962e262

Please sign in to comment.