Skip to content

Commit

Permalink
Merge pull request #4173 from devnexen/map_droppable_linux
Browse files Browse the repository at this point in the history
Adding MAP_DROPPABLE for Linux (6.11)
  • Loading branch information
tgross35 authored Dec 4, 2024
2 parents a8628c3 + 40a4d33 commit 149d392
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 149d392

Please sign in to comment.