Merge pull request #1174 from tklauser/mfd-hugetlb

Add MFD_HUGETLB const for linux
This commit is contained in:
Alex Crichton 2018-12-13 09:34:16 -06:00 committed by GitHub
commit ed8309bc03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -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"

View file

@ -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;

View file

@ -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