diff --git a/.cirrus.yml b/.cirrus.yml index 24f152846d97f..929f87192b05a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,7 +29,7 @@ task: task: name: nightly x86_64-unknown-freebsd-14 freebsd_instance: - image: freebsd-14-0-current-amd64-v20230330 + image: freebsd-14-0-current-amd64-v20230420 setup_script: - pkg install -y libnghttp2 curl - curl https://sh.rustup.rs -sSf --output rustup.sh diff --git a/libc-test/build.rs b/libc-test/build.rs index 2b20745ee3e74..7e6f7efad1be6 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2202,9 +2202,13 @@ fn test_freebsd(target: &str) { // Added in freebsd 14. "IFCAP_MEXTPG" if Some(14) > freebsd_ver => true, + // Added in freebsd 13 but replaced by IFF_NEEDSEPOCH. + "IFF_KNOWSEPOCH" => true, + // Added in freebsd 14. + "IFF_NEEDSEPOCH" if Some(14) > freebsd_ver => true, // Added in freebsd 13. - "IFF_KNOWSEPOCH" | "IFCAP_TXTLS4" | "IFCAP_TXTLS6" | "IFCAP_VXLAN_HWCSUM" - | "IFCAP_VXLAN_HWTSO" | "IFCAP_TXTLS_RTLMT" | "IFCAP_TXTLS" + "IFCAP_TXTLS4" | "IFCAP_TXTLS6" | "IFCAP_VXLAN_HWCSUM" | "IFCAP_VXLAN_HWTSO" + | "IFCAP_TXTLS_RTLMT" | "IFCAP_TXTLS" if Some(13) > freebsd_ver => { true diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index c453e7c9b1c13..e140e32155add 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -3163,8 +3163,15 @@ pub const IFF_DEBUG: ::c_int = 0x4; pub const IFF_LOOPBACK: ::c_int = 0x8; /// (i) is a point-to-point link pub const IFF_POINTOPOINT: ::c_int = 0x10; -/// (i) calls if_input in net epoch -pub const IFF_KNOWSEPOCH: ::c_int = 0x20; +cfg_if! { + if #[cfg(not(freebsd14))] { + /// (i) calls if_input in net epoch + pub const IFF_KNOWSEPOCH: ::c_int = 0x20; + } else { + /// (i) calls if_input in net epoch + pub const IFF_NEEDSEPOCH: ::c_int = 0x20; + } +} /// (d) resources allocated pub const IFF_RUNNING: ::c_int = 0x40; #[doc(hidden)]