Skip to content

Commit

Permalink
Merge #1636
Browse files Browse the repository at this point in the history
1636: Add MAP_FIXED_NOREPLACE on Linux r=rtzoeller a=rtzoeller

Resolves #1393.

Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
  • Loading branch information
bors[bot] and rtzoeller authored Jan 19, 2022
2 parents c3731f1 + 5f00721 commit c84316b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1634](https://github.com/nix-rust/nix/pull/1634))
- Added `getresuid`, `setresuid`, `getresgid`, and `setresgid` on DragonFly, FreeBSD, and OpenBSD.
(#[1628](https://github.com/nix-rust/nix/pull/1628))
- Added `MAP_FIXED_NOREPLACE` on Linux.
(#[1636](https://github.com/nix-rust/nix/pull/1636))

### Changed
### Fixed
Expand Down
4 changes: 4 additions & 0 deletions src/sys/mman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ libc_bitflags!{
MAP_PRIVATE;
/// Place the mapping at exactly the address specified in `addr`.
MAP_FIXED;
/// Place the mapping at exactly the address specified in `addr`, but never clobber an existing range.
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_FIXED_NOREPLACE;
/// To be used with `MAP_FIXED`, to forbid the system
/// to select a different address than the one specified.
#[cfg(target_os = "freebsd")]
Expand Down

0 comments on commit c84316b

Please sign in to comment.