Skip to content

Commit ed8309b

Browse files
authored
Merge pull request #1174 from tklauser/mfd-hugetlb
Add MFD_HUGETLB const for linux
2 parents c66221d + df277e2 commit ed8309b

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

libc-test/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@ fn main() {
652652
"BOTHER" => true,
653653

654654
"MFD_CLOEXEC" | "MFD_ALLOW_SEALING" if !mips && musl => true,
655+
// MFD_HUGETLB is not available in some older libc versions on the CI builders. On the
656+
// x86_64 and i686 builders it seems to be available for all targets, so at least test
657+
// it there.
658+
"MFD_HUGETLB" if !(x86_64 || i686) || musl => true,
655659

656660
"DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG"
657661
| "DT_LNK" | "DT_SOCK"

src/unix/notbsd/android/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,7 @@ pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
10561056

10571057
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
10581058
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
1059+
pub const MFD_HUGETLB: ::c_uint = 0x0004;
10591060

10601061
// linux/netfilter.h
10611062
pub const NF_DROP: ::c_int = 0;

src/unix/notbsd/linux/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,7 @@ pub const CMSPAR: ::tcflag_t = 0o10000000000;
13201320

13211321
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
13221322
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
1323+
pub const MFD_HUGETLB: ::c_uint = 0x0004;
13231324

13241325
// these are used in the p_type field of Elf32_Phdr and Elf64_Phdr, which has
13251326
// the type Elf32Word and Elf64Word respectively. Luckily, both of those are u32

0 commit comments

Comments
 (0)