Detect FreeBSD 14
This commit is contained in:
parent
1f3e2ab7f6
commit
65b16d9424
2
build.rs
2
build.rs
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
@ -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)] {
|
||||
|
|
Loading…
Reference in a new issue