diff --git a/CHANGELOG.md b/CHANGELOG.md index 75fc82def4..f79a1cbebf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. + (#[TODO](https://github.com/nix-rust/nix/pull/TODO)) ### Changed ### Fixed diff --git a/src/sys/mman.rs b/src/sys/mman.rs index 7302a65a2f..523b468341 100644 --- a/src/sys/mman.rs +++ b/src/sys/mman.rs @@ -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")]