Skip to content

Commit

Permalink
Auto merge of #3340 - devnexen:linux_madv_collapse, r=JohnTitor
Browse files Browse the repository at this point in the history
linux MADV_COLLAPSE addition
  • Loading branch information
bors committed Sep 23, 2023
2 parents 76ebf0c + 53e039b commit 6bfea27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Expand Up @@ -3805,6 +3805,9 @@ fn test_linux(target: &str) {
| "MADV_POPULATE_WRITE"
if musl => true,

// kernel 6.1 minimum
"MADV_COLLAPSE" => true,

// FIXME: Requires more recent kernel headers
| "IFLA_PARENT_DEV_NAME" // linux v5.13+
| "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-gnu.txt
Expand Up @@ -118,6 +118,7 @@ LM_ID_BASE
LM_ID_NEWLM
LOGIN_PROCESS
Lmid_t
MADV_COLLAPSE
MAXTC
MAX_LINKS
MINIX2_SUPER_MAGIC
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -1093,6 +1093,8 @@ pub const GLOB_TILDE: ::c_int = 1 << 12;
pub const GLOB_ONLYDIR: ::c_int = 1 << 13;
pub const GLOB_TILDE_CHECK: ::c_int = 1 << 14;

pub const MADV_COLLAPSE: ::c_int = 25;

cfg_if! {
if #[cfg(any(
target_arch = "arm",
Expand Down

0 comments on commit 6bfea27

Please sign in to comment.