Skip to content

Commit

Permalink
Detect FreeBSD 14
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Nov 17, 2021
1 parent 1f3e2ab commit c288212
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}

Expand Down Expand Up @@ -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,
}
}
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)] {
Expand Down

0 comments on commit c288212

Please sign in to comment.