Skip to content

Commit 008ffc1

Browse files
devnexentgross35
authored andcommitted
Adding MAP_DROPPABLE for Linux (6.11)
ref: https://github.com/torvalds/linux/blob/feffde684ac29a3b7aec82d2df850fbdbdee55e4/include/uapi/linux/mman.h#L20 (backport <#4173>) (cherry picked from commit 40a4d33)
1 parent 76b35d3 commit 008ffc1

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4321,6 +4321,9 @@ fn test_linux(target: &str) {
43214321
"EPIOCSPARAMS"
43224322
| "EPIOCGPARAMS" => true,
43234323

4324+
// FIXME: Requires >= 6.11 kernel headers.
4325+
"MAP_DROPPABLE" => true,
4326+
43244327
_ => false,
43254328
}
43264329
});

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,7 @@ MADV_UNMERGEABLE
15861586
MADV_WILLNEED
15871587
MADV_WIPEONFORK
15881588
MAP_DENYWRITE
1589+
MAP_DROPPABLE
15891590
MAP_EXECUTABLE
15901591
MAP_FILE
15911592
MAP_FIXED_NOREPLACE

src/unix/linux_like/linux/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4730,6 +4730,7 @@ pub const UDP_NO_CHECK6_RX: c_int = 102;
47304730

47314731
// include/uapi/linux/mman.h
47324732
pub const MAP_SHARED_VALIDATE: c_int = 0x3;
4733+
pub const MAP_DROPPABLE: c_int = 0x8;
47334734

47344735
// include/uapi/asm-generic/mman-common.h
47354736
pub const MAP_FIXED_NOREPLACE: c_int = 0x100000;

0 commit comments

Comments
 (0)