Skip to content

Commit

Permalink
Auto merge of #3167 - devnexen:fbsd_map_aligned, r=JohnTitor
Browse files Browse the repository at this point in the history
freebsd add MAP_ALIGNED macro
  • Loading branch information
bors committed Mar 27, 2023
2 parents 9ac18cd + 4d4b6d0 commit eb1e6c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libc-test/semver/freebsd.txt
Expand Up @@ -702,6 +702,8 @@ MALLOCX_ARENA
MALLOCX_ALIGN
MALLOCX_TCACHE
MALLOCX_ZERO
MAP_ALIGNED
MAP_ALIGNED_SUPER
MAP_COPY
MAP_EXCL
MAP_FILE
Expand Down
6 changes: 5 additions & 1 deletion src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -2664,7 +2664,7 @@ pub const Q_SETQUOTA: ::c_int = 0x800;
pub const MAP_GUARD: ::c_int = 0x00002000;
pub const MAP_EXCL: ::c_int = 0x00004000;
pub const MAP_PREFAULT_READ: ::c_int = 0x00040000;
pub const MAP_ALIGNED_SUPER: ::c_int = 1 << 24;
pub const MAP_ALIGNED_SUPER: ::c_int = MAP_ALIGNED(1);

pub const POSIX_FADV_NORMAL: ::c_int = 0;
pub const POSIX_FADV_RANDOM: ::c_int = 1;
Expand Down Expand Up @@ -4813,6 +4813,10 @@ safe_f! {
pub {const} fn PR_SCTP_VALID_POLICY(x: ::c_int) -> bool {
PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX
}

pub {const} fn MAP_ALIGNED(a: ::c_int) -> ::c_int {
a << 24
}
}

cfg_if! {
Expand Down

0 comments on commit eb1e6c3

Please sign in to comment.