Skip to content

Commit 6bfea27

Browse files
committed
Auto merge of #3340 - devnexen:linux_madv_collapse, r=JohnTitor
linux MADV_COLLAPSE addition
2 parents 76ebf0c + 53e039b commit 6bfea27

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
@@ -3805,6 +3805,9 @@ fn test_linux(target: &str) {
38053805
| "MADV_POPULATE_WRITE"
38063806
if musl => true,
38073807

3808+
// kernel 6.1 minimum
3809+
"MADV_COLLAPSE" => true,
3810+
38083811
// FIXME: Requires more recent kernel headers
38093812
| "IFLA_PARENT_DEV_NAME" // linux v5.13+
38103813
| "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)