Skip to content

Commit c84316b

Browse files
bors[bot]rtzoeller
andauthored
Merge #1636
1636: Add MAP_FIXED_NOREPLACE on Linux r=rtzoeller a=rtzoeller Resolves #1393. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2 parents c3731f1 + 5f00721 commit c84316b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
3535
(#[1634](https://github.com/nix-rust/nix/pull/1634))
3636
- Added `getresuid`, `setresuid`, `getresgid`, and `setresgid` on DragonFly, FreeBSD, and OpenBSD.
3737
(#[1628](https://github.com/nix-rust/nix/pull/1628))
38+
- Added `MAP_FIXED_NOREPLACE` on Linux.
39+
(#[1636](https://github.com/nix-rust/nix/pull/1636))
3840

3941
### Changed
4042
### Fixed

src/sys/mman.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ libc_bitflags!{
4343
MAP_PRIVATE;
4444
/// Place the mapping at exactly the address specified in `addr`.
4545
MAP_FIXED;
46+
/// Place the mapping at exactly the address specified in `addr`, but never clobber an existing range.
47+
#[cfg(target_os = "linux")]
48+
#[cfg_attr(docsrs, doc(cfg(all())))]
49+
MAP_FIXED_NOREPLACE;
4650
/// To be used with `MAP_FIXED`, to forbid the system
4751
/// to select a different address than the one specified.
4852
#[cfg(target_os = "freebsd")]

0 commit comments

Comments
 (0)