File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
src/unix/bsd/netbsdlike/netbsd Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -628,6 +628,7 @@ MADV_NORMAL
628628MADV_RANDOM
629629MADV_SEQUENTIAL
630630MADV_WILLNEED
631+ MAP_ALIGNED
631632MAP_ALIGNMENT_16MB
632633MAP_ALIGNMENT_1TB
633634MAP_ALIGNMENT_256TB
Original file line number Diff line number Diff line change @@ -2384,6 +2384,19 @@ pub const GRND_NONBLOCK: ::c_uint = 0x1;
23842384pub const GRND_RANDOM : :: c_uint = 0x2 ;
23852385pub const GRND_INSECURE : :: c_uint = 0x4 ;
23862386
2387+ cfg_if ! {
2388+
2389+ if #[ cfg( libc_const_extern_fn) ] {
2390+ pub const fn MAP_ALIGNED ( alignment: :: c_int) -> :: c_int {
2391+ alignment << MAP_ALIGNMENT_SHIFT
2392+ }
2393+ } else {
2394+ pub fn MAP_ALIGNED ( alignment: :: c_int) -> :: c_int {
2395+ alignment << MAP_ALIGNMENT_SHIFT
2396+ }
2397+ }
2398+ }
2399+
23872400const_fn ! {
23882401 { const } fn _ALIGN( p: usize ) -> usize {
23892402 ( p + _ALIGNBYTES) & !_ALIGNBYTES
You can’t perform that action at this time.
0 commit comments