Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAP_HUGE_SHIFT & HUGETLB_FLAG_ENCODE_SHIFT for Andorid/Fuchsia #3444

Merged
merged 1 commit into from Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/semver/android.txt
Expand Up @@ -3766,3 +3766,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
2 changes: 2 additions & 0 deletions src/unix/linux_like/android/mod.rs
Expand Up @@ -3320,6 +3320,8 @@ 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