diff --git a/libc-test/build.rs b/libc-test/build.rs index 26f746b01f154..a6137f4a506e2 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2105,6 +2105,19 @@ fn test_freebsd(target: &str) { | "MFD_CLOEXEC" | "MFD_ALLOW_SEALING" | "MFD_HUGETLB" + | "MFD_HUGE_MASK" + | "MFD_HUGE_64KB" + | "MFD_HUGE_512KB" + | "MFD_HUGE_1MB" + | "MFD_HUGE_2MB" + | "MFD_HUGE_8MB" + | "MFD_HUGE_16MB" + | "MFD_HUGE_32MB" + | "MFD_HUGE_256MB" + | "MFD_HUGE_512MB" + | "MFD_HUGE_1GB" + | "MFD_HUGE_2GB" + | "MFD_HUGE_16GB" if Some(13) > freebsd_ver => { true diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index f1ce1b571ae93..491c57917008d 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -699,6 +699,22 @@ MAXTC MCL_CURRENT MCL_FUTURE MDMBUF +MFD_ALLOW_SEALING +MFD_CLOEXEC +MFD_HUGE_16GB +MFD_HUGE_16MB +MFD_HUGE_1GB +MFD_HUGE_1MB +MFD_HUGE_256MB +MFD_HUGE_2GB +MFD_HUGE_2MB +MFD_HUGE_32MB +MFD_HUGE_512KB +MFD_HUGE_512MB +MFD_HUGE_64KB +MFD_HUGE_8MB +MFD_HUGE_MASK +MFD_HUGETLB MINCORE_INCORE MINCORE_MODIFIED MINCORE_MODIFIED_OTHER diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index a44af09eb6e97..43686d3f51fae 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -3657,6 +3657,19 @@ pub const CPUCLOCK_WHICH_TID: ::c_int = 1; pub const MFD_CLOEXEC: ::c_uint = 0x00000001; pub const MFD_ALLOW_SEALING: ::c_uint = 0x00000002; pub const MFD_HUGETLB: ::c_uint = 0x00000004; +pub const MFD_HUGE_MASK: ::c_uint = 0xFC000000; +pub const MFD_HUGE_64KB: ::c_uint = 16 << 26; +pub const MFD_HUGE_512KB: ::c_uint = 19 << 26; +pub const MFD_HUGE_1MB: ::c_uint = 20 << 26; +pub const MFD_HUGE_2MB: ::c_uint = 21 << 26; +pub const MFD_HUGE_8MB: ::c_uint = 23 << 26; +pub const MFD_HUGE_16MB: ::c_uint = 24 << 26; +pub const MFD_HUGE_32MB: ::c_uint = 25 << 26; +pub const MFD_HUGE_256MB: ::c_uint = 28 << 26; +pub const MFD_HUGE_512MB: ::c_uint = 29 << 26; +pub const MFD_HUGE_1GB: ::c_uint = 30 << 26; +pub const MFD_HUGE_2GB: ::c_uint = 31 << 26; +pub const MFD_HUGE_16GB: ::c_uint = 34 << 26; pub const SHM_LARGEPAGE_ALLOC_DEFAULT: ::c_int = 0; pub const SHM_LARGEPAGE_ALLOC_NOWAIT: ::c_int = 1;