Skip to content

Commit

Permalink
sys::mman adding MMAP_TRYFIXED for netbsdlike platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Dec 10, 2023
1 parent 43505e0 commit 418a2d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ targets = [
]

[dependencies]
libc = { git = "https://github.com/rust-lang/libc", rev = "497ac428bc010b5db9682ecf94cd567b31d53e5c", features = ["extra_traits"] }
libc = { git = "https://github.com/rust-lang/libc", rev = "f37806e499409eab8cfa897280a869bc5e2623a9", features = ["extra_traits"] }
bitflags = "2.3.1"
cfg-if = "1.0"
pin-utils = { version = "0.1.0", optional = true }
Expand Down
1 change: 1 addition & 0 deletions changelog/2260.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added `MmapFlags::MAP_FIXED` constant in `sys::mman` for netbsd and openbsd
4 changes: 4 additions & 0 deletions src/sys/mman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ libc_bitflags! {
/// Pages will be discarded in the core dumps.
#[cfg(target_os = "openbsd")]
MAP_CONCEAL;
/// Attempt to place the mapping at exactly the address specified in `addr`.
/// it's a default behavior on openbsd.
#[cfg(netbsdlike)]
MAP_TRYFIXED;
}
}

Expand Down

0 comments on commit 418a2d5

Please sign in to comment.