Skip to content

Commit

Permalink
freebsd add MAP_ALIGNED macro
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Mar 25, 2023
1 parent 74e81a5 commit 4bebf9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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
3 changes: 3 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -4698,6 +4698,9 @@ f! {
as ::c_uint
}

pub {const} fn MAP_ALIGNED(a: ::c_int) -> ::c_int {
a << 24
}
pub fn MALLOCX_ALIGN(lg: ::c_uint) -> ::c_int {
ffsl(lg as ::c_long - 1)
}
Expand Down

0 comments on commit 4bebf9d

Please sign in to comment.