diff options
author | bors <bors@rust-lang.org> | 2023-04-09 17:06:45 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-04-09 17:06:45 +0000 |
commit | 56a74a6c3f0d1887069029eeda1937b97a2de670 (patch) | |
tree | 9930564b62ae999481cb711b037e3b927debbd27 /src | |
parent | 2d2d74ce7059725f5c07aa0bf292cceef42de307 (diff) | |
parent | e6c1c657cb83a11bfc119dab5d458b8699dbe6f9 (diff) | |
download | rust-libc-56a74a6c3f0d1887069029eeda1937b97a2de670.tar.gz |
Auto merge of #3167 - devnexen:fbsd_map_aligned, r=JohnTitor
freebsd add MAP_ALIGNED macro
Diffstat (limited to 'src')
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 55b520faab..2ee676d973 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -4670,6 +4670,18 @@ pub const SCTP_ASSOC_RESET_FAILED: ::c_int = 0x0008; pub const SCTP_STREAM_CHANGE_DENIED: ::c_int = 0x0004; pub const SCTP_STREAM_CHANGE_FAILED: ::c_int = 0x0008; +cfg_if! { + if #[cfg(libc_const_extern_fn)] { + pub const fn MAP_ALIGNED(a: ::c_int) -> ::c_int { + a << 24 + } + } else { + pub fn MAP_ALIGNED(a: ::c_int) -> ::c_int { + a << 24 + } + } +} + const_fn! { {const} fn _ALIGN(p: usize) -> usize { (p + _ALIGNBYTES) & !_ALIGNBYTES |