Skip to content

Commit

Permalink
Add MAP_FIXED_NOREPLACE on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
rtzoeller committed Jan 18, 2022
1 parent 18d1f62 commit 5f00721
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -33,6 +33,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1615](https://github.com/nix-rust/nix/pull/1615))
- 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
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 5f00721

Please sign in to comment.