Skip to content

Commit 53e039b

Browse files
committed
linux MADV_COLLAPSE addition
1 parent 8356615 commit 53e039b

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

libc-test/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3791,6 +3791,9 @@ fn test_linux(target: &str) {
37913791
| "MADV_POPULATE_WRITE"
37923792
if musl => true,
37933793

3794+
// kernel 6.1 minimum
3795+
"MADV_COLLAPSE" => true,
3796+
37943797
// FIXME: Requires more recent kernel headers
37953798
| "IFLA_PARENT_DEV_NAME" // linux v5.13+
37963799
| "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+

libc-test/semver/linux-gnu.txt

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ LM_ID_BASE
118118
LM_ID_NEWLM
119119
LOGIN_PROCESS
120120
Lmid_t
121+
MADV_COLLAPSE
121122
MAXTC
122123
MAX_LINKS
123124
MINIX2_SUPER_MAGIC

src/unix/linux_like/linux/gnu/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,8 @@ pub const GLOB_TILDE: ::c_int = 1 << 12;
10931093
pub const GLOB_ONLYDIR: ::c_int = 1 << 13;
10941094
pub const GLOB_TILDE_CHECK: ::c_int = 1 << 14;
10951095

1096+
pub const MADV_COLLAPSE: ::c_int = 25;
1097+
10961098
cfg_if! {
10971099
if #[cfg(any(
10981100
target_arch = "arm",

0 commit comments

Comments
 (0)