diff options
author | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-01-18 16:42:52 -0600 |
---|---|---|
committer | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-01-18 16:48:12 -0600 |
commit | 5f0072130e3d5e942601cc06da9934f2e3ab5c07 (patch) | |
tree | 6dad1a48de6abdd0280ccf71456e23cc319cfac2 /src/sys/mman.rs | |
parent | 18d1f62b150177ca4c40e2cbe21a98ddba80ecf7 (diff) | |
download | nix-5f0072130e3d5e942601cc06da9934f2e3ab5c07.zip |
Add MAP_FIXED_NOREPLACE on Linux
Diffstat (limited to 'src/sys/mman.rs')
-rw-r--r-- | src/sys/mman.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sys/mman.rs b/src/sys/mman.rs index 7302a65a..523b4683 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")] |