Detect FreeBSD 14

This commit is contained in:
Yuki Okushi 2021-11-17 13:44:21 +09:00
parent 1f3e2ab7f6
commit 65b16d9424
No known key found for this signature in database
GPG key ID: DABA5B072961C18A
3 changed files with 4 additions and 1 deletions

View file

@ -31,6 +31,7 @@ fn main() {
Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"),
Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"),
Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"),
Some(14) if libc_ci => println!("cargo:rustc-cfg=freebsd14"),
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
}
@ -150,6 +151,7 @@ fn which_freebsd() -> Option<i32> {
s if s.starts_with("11") => Some(11),
s if s.starts_with("12") => Some(12),
s if s.starts_with("13") => Some(13),
s if s.starts_with("14") => Some(14),
_ => None,
}
}

View file

@ -1756,6 +1756,7 @@ fn test_freebsd(target: &str) {
Some(11) => cfg.cfg("freebsd11", None),
Some(12) => cfg.cfg("freebsd12", None),
Some(13) => cfg.cfg("freebsd13", None),
Some(14) => cfg.cfg("freebsd14", None),
_ => &mut cfg,
};

View file

@ -2624,7 +2624,7 @@ extern "C" {
}
cfg_if! {
if #[cfg(freebsd13)] {
if #[cfg(any(freebsd13, freebsd14))] {
mod freebsd13;
pub use self::freebsd13::*;
} else if #[cfg(freebsd12)] {