diff --git a/libc-test/build.rs b/libc-test/build.rs index ba428fc7303d1..b42402f08a229 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2148,6 +2148,9 @@ fn test_freebsd(target: &str) { // Added in FreeBSD 14 "LIO_READV" | "LIO_WRITEV" | "LIO_VECTORED" if Some(14) > freebsd_ver => true, + // Added in FreeBSD 13 + "FIOSSHMLPGCNF" if Some(13) > freebsd_ver => true, + _ => false, } }); @@ -2178,6 +2181,8 @@ fn test_freebsd(target: &str) { // `sockcred2` is not available in FreeBSD 12. "sockcred2" if Some(13) > freebsd_ver => true, + // `shm_largepage_conf` was introduced in FreeBSD 13. + "shm_largepage_conf" if Some(13) > freebsd_ver => true, _ => false, } diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 5bba5f307028e..e74355f1e5a07 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -341,6 +341,7 @@ FIONWRITE FIOSEEKDATA FIOSEEKHOLE FIOSETOWN +FIOSSHMLPGCNF FLUSHO FOPEN_MAX F_DUP2FD diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 42a71b21332ed..4ed525968e069 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -992,6 +992,12 @@ s! { pub _flags: u32, pub _clockid: u32, } + + pub struct shm_largepage_conf { + pub psind: ::c_int, + pub alloc_policy: ::c_int, + __pad: [::c_int; 10], + } } s_no_extra_traits! { @@ -2254,6 +2260,7 @@ pub const FIONWRITE: ::c_ulong = 0x40046677; pub const FIONSPACE: ::c_ulong = 0x40046676; pub const FIOSEEKDATA: ::c_ulong = 0xc0086661; pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662; +pub const FIOSSHMLPGCNF: ::c_ulong = 0x80306664; pub const JAIL_API_VERSION: u32 = 2; pub const JAIL_CREATE: ::c_int = 0x01;