File tree 2 files changed +15
-1
lines changed
src/unix/bsd/freebsdlike/freebsd 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -702,6 +702,8 @@ MALLOCX_ARENA
702
702
MALLOCX_ALIGN
703
703
MALLOCX_TCACHE
704
704
MALLOCX_ZERO
705
+ MAP_ALIGNED
706
+ MAP_ALIGNED_SUPER
705
707
MAP_COPY
706
708
MAP_EXCL
707
709
MAP_FILE
Original file line number Diff line number Diff line change @@ -2664,7 +2664,7 @@ pub const Q_SETQUOTA: ::c_int = 0x800;
2664
2664
pub const MAP_GUARD : :: c_int = 0x00002000 ;
2665
2665
pub const MAP_EXCL : :: c_int = 0x00004000 ;
2666
2666
pub const MAP_PREFAULT_READ : :: c_int = 0x00040000 ;
2667
- pub const MAP_ALIGNED_SUPER : :: c_int = 1 << 24 ;
2667
+ pub const MAP_ALIGNED_SUPER : :: c_int = MAP_ALIGNED ( 1 ) ;
2668
2668
2669
2669
pub const POSIX_FADV_NORMAL : :: c_int = 0 ;
2670
2670
pub const POSIX_FADV_RANDOM : :: c_int = 1 ;
@@ -4659,6 +4659,18 @@ pub const SCTP_ASSOC_RESET_FAILED: ::c_int = 0x0008;
4659
4659
pub const SCTP_STREAM_CHANGE_DENIED : :: c_int = 0x0004 ;
4660
4660
pub const SCTP_STREAM_CHANGE_FAILED : :: c_int = 0x0008 ;
4661
4661
4662
+ cfg_if ! {
4663
+ if #[ cfg( libc_const_extern_fn) ] {
4664
+ pub const fn MAP_ALIGNED ( a: :: c_int) -> :: c_int {
4665
+ a << 24
4666
+ }
4667
+ } else {
4668
+ pub fn MAP_ALIGNED ( a: :: c_int) -> :: c_int {
4669
+ a << 24
4670
+ }
4671
+ }
4672
+ }
4673
+
4662
4674
const_fn ! {
4663
4675
{ const } fn _ALIGN( p: usize ) -> usize {
4664
4676
( p + _ALIGNBYTES) & !_ALIGNBYTES
You can’t perform that action at this time.
0 commit comments