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 f53ad8d
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 @@ -1802,6 +1802,9 @@ fn test_android(target: &str) {
| "MADV_POPULATE_READ"
| "MADV_POPULATE_WRITE" => true,

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

// kernel 5.6 minimum required
"IPPROTO_MPTCP" | "IPPROTO_ETHERNET" => true,

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 f53ad8d

Please sign in to comment.