summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-09-17 19:00:13 +0100
committerDavid Carlier <devnexen@gmail.com>2021-09-18 17:16:05 +0100
commit63d40948e66ec2e15e5c6e03fa7f1a0590ccb0e7 (patch)
tree617e46866b6329ee562173a1bfb6193bc06d9f08
parentb45d84260ecb29aacc2903e575ccd3f5fca08da1 (diff)
downloadnix-63d40948e66ec2e15e5c6e03fa7f1a0590ccb0e7.zip
mman: add MAP_EXCL flag for freebsd.
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/sys/mman.rs4
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef891aea..eb1ec569 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1516](https://github.com/nix-rust/nix/pull/1516))
- Added `Ipv4Ttl` and `Ipv6Ttl` sockopts.
(#[1515](https://github.com/nix-rust/nix/pull/1515))
+- Added `MAP_EXCL` mmap flag for freebsd.
+ (#[1525](https://github.com/nix-rust/nix/pull/1525))
### Changed
diff --git a/src/sys/mman.rs b/src/sys/mman.rs
index ba6eb661..e3c36208 100644
--- a/src/sys/mman.rs
+++ b/src/sys/mman.rs
@@ -40,6 +40,10 @@ libc_bitflags!{
MAP_PRIVATE;
/// Place the mapping at exactly the address specified in `addr`.
MAP_FIXED;
+ /// To be used with `MAP_FIXED`, to forbid the system
+ /// to select a different address than the one specified.
+ #[cfg(target_os = "freebsd")]
+ MAP_EXCL;
/// Synonym for `MAP_ANONYMOUS`.
MAP_ANON;
/// The mapping is not backed by any file.