Skip to content

Commit

Permalink
Adding MAP_DROPPABLE for Linux (6.11)
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Dec 4, 2024
1 parent a8628c3 commit 40a4d33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4246,6 +4246,9 @@ fn test_linux(target: &str) {
"EPIOCSPARAMS"
| "EPIOCGPARAMS" => true,

// FIXME: Requires >= 6.11 kernel headers.
"MAP_DROPPABLE" => true,

_ => false,
}
});
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,7 @@ MADV_UNMERGEABLE
MADV_WILLNEED
MADV_WIPEONFORK
MAP_DENYWRITE
MAP_DROPPABLE
MAP_EXECUTABLE
MAP_FILE
MAP_FIXED_NOREPLACE
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4767,6 +4767,7 @@ pub const UDP_NO_CHECK6_RX: c_int = 102;

// include/uapi/linux/mman.h
pub const MAP_SHARED_VALIDATE: c_int = 0x3;
pub const MAP_DROPPABLE: c_int = 0x8;

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

0 comments on commit 40a4d33

Please sign in to comment.