Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freebsd 14 build fix attempt. #3216

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down