Skip to content

Commit 86fec80

Browse files
bors[bot]devnexen
andauthored
Merge #1525
1525: mman: add MAP_EXCL flag for freebsd. r=asomers a=devnexen Co-authored-by: David Carlier <devnexen@gmail.com>
2 parents 781ab2e + 63d4094 commit 86fec80

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
@@ -42,6 +42,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
4242
(#[1516](https://github.com/nix-rust/nix/pull/1516))
4343
- Added `Ipv4Ttl` and `Ipv6Ttl` sockopts.
4444
(#[1515](https://github.com/nix-rust/nix/pull/1515))
45+
- Added `MAP_EXCL` mmap flag for freebsd.
46+
(#[1525](https://github.com/nix-rust/nix/pull/1525))
4547

4648
### Changed
4749

src/sys/mman.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ libc_bitflags!{
4040
MAP_PRIVATE;
4141
/// Place the mapping at exactly the address specified in `addr`.
4242
MAP_FIXED;
43+
/// To be used with `MAP_FIXED`, to forbid the system
44+
/// to select a different address than the one specified.
45+
#[cfg(target_os = "freebsd")]
46+
MAP_EXCL;
4347
/// Synonym for `MAP_ANONYMOUS`.
4448
MAP_ANON;
4549
/// The mapping is not backed by any file.

0 commit comments

Comments
 (0)