Skip to content

Commit

Permalink
linux MADV_COLLAPSE addition
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Sep 6, 2023
1 parent 8356615 commit 53e039b
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 @@ -3791,6 +3791,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 53e039b

Please sign in to comment.