Skip to content

Commit 497ac42

Browse files
committed
Auto merge of #3444 - SteveLauC:map_huge_shift, r=JohnTitor
MAP_HUGE_SHIFT & HUGETLB_FLAG_ENCODE_SHIFT for Andorid/Fuchsia Add these 2 constants for Android and Fuchsia
2 parents 71200cd + b20eccc commit 497ac42

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

libc-test/semver/android.txt

+2
Original file line numberDiff line numberDiff line change
@@ -3766,3 +3766,5 @@ dirname
37663766
basename
37673767
eventfd_read
37683768
eventfd_write
3769+
HUGETLB_FLAG_ENCODE_SHIFT
3770+
MAP_HUGE_SHIFT

libc-test/semver/fuchsia.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1472,3 +1472,5 @@ utimensat
14721472
vhangup
14731473
vmsplice
14741474
waitid
1475+
HUGETLB_FLAG_ENCODE_SHIFT
1476+
MAP_HUGE_SHIFT

src/fuchsia/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3233,6 +3233,9 @@ pub const O_DIRECT: ::c_int = 0x00000800;
32333233
pub const O_LARGEFILE: ::c_int = 0x00001000;
32343234
pub const O_NOFOLLOW: ::c_int = 0x00000080;
32353235

3236+
pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26;
3237+
pub const MAP_HUGE_SHIFT: u32 = 26;
3238+
32363239
// intentionally not public, only used for fd_set
32373240
cfg_if! {
32383241
if #[cfg(target_pointer_width = "32")] {

src/unix/linux_like/android/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3320,6 +3320,8 @@ pub const NET_SCTP: ::c_int = 17;
33203320
pub const NET_LLC: ::c_int = 18;
33213321
pub const NET_NETFILTER: ::c_int = 19;
33223322
pub const NET_DCCP: ::c_int = 20;
3323+
pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26;
3324+
pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT;
33233325

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

0 commit comments

Comments
 (0)