Skip to content

Commit

Permalink
MAP_HUGE_SHIFT & HUGETLB_FLAG_ENCODE_SHIFT for Andorid/Fuchsia
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Nov 14, 2023
1 parent 1ec4e59 commit 63a0941
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/android.txt
Expand Up @@ -3758,3 +3758,5 @@ dirname
basename
eventfd_read
eventfd_write
HUGETLB_FLAG_ENCODE_SHIFT
MAP_HUGE_SHIFT
2 changes: 2 additions & 0 deletions libc-test/semver/fuchsia.txt
Expand Up @@ -1472,3 +1472,5 @@ utimensat
vhangup
vmsplice
waitid
HUGETLB_FLAG_ENCODE_SHIFT
MAP_HUGE_SHIFT
3 changes: 3 additions & 0 deletions src/fuchsia/mod.rs
Expand Up @@ -3233,6 +3233,9 @@ pub const O_DIRECT: ::c_int = 0x00000800;
pub const O_LARGEFILE: ::c_int = 0x00001000;
pub const O_NOFOLLOW: ::c_int = 0x00000080;

pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26;
pub const MAP_HUGE_SHIFT: u32 = 26;

// intentionally not public, only used for fd_set
cfg_if! {
if #[cfg(target_pointer_width = "32")] {
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/android/mod.rs
Expand Up @@ -3292,6 +3292,9 @@ pub const NET_SCTP: ::c_int = 17;
pub const NET_LLC: ::c_int = 18;
pub const NET_NETFILTER: ::c_int = 19;
pub const NET_DCCP: ::c_int = 20;
pub const HUGETLB_FLAG_ENCODE_SHIFT: c_int = 26;
pub const MAP_HUGE_SHIFT: c_int = HUGETLB_FLAG_ENCODE_SHIFT;


// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
// following are only available on newer Linux versions than the versions
Expand Down

0 comments on commit 63a0941

Please sign in to comment.