summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc-test/build.rs4
-rw-r--r--src/unix/notbsd/android/mod.rs1
-rw-r--r--src/unix/notbsd/linux/mod.rs1
3 files changed, 6 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 460eb7241d..e6c9c7907d 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -652,6 +652,10 @@ fn main() {
"BOTHER" => true,
"MFD_CLOEXEC" | "MFD_ALLOW_SEALING" if !mips && musl => true,
+ // MFD_HUGETLB is not available in some older libc versions on the CI builders. On the
+ // x86_64 and i686 builders it seems to be available for all targets, so at least test
+ // it there.
+ "MFD_HUGETLB" if !(x86_64 || i686) || musl => true,
"DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG"
| "DT_LNK" | "DT_SOCK"
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs
index 70052e1966..31e0c44db4 100644
--- a/src/unix/notbsd/android/mod.rs
+++ b/src/unix/notbsd/android/mod.rs
@@ -1056,6 +1056,7 @@ pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
+pub const MFD_HUGETLB: ::c_uint = 0x0004;
// linux/netfilter.h
pub const NF_DROP: ::c_int = 0;
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 1aeceb1a40..b8da914a8d 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1320,6 +1320,7 @@ pub const CMSPAR: ::tcflag_t = 0o10000000000;
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
+pub const MFD_HUGETLB: ::c_uint = 0x0004;
// these are used in the p_type field of Elf32_Phdr and Elf64_Phdr, which has
// the type Elf32Word and Elf64Word respectively. Luckily, both of those are u32