Skip to content

Commit 65b16d9

Browse files
committed
Detect FreeBSD 14
1 parent 1f3e2ab commit 65b16d9

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ fn main() {
3131
Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"),
3232
Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"),
3333
Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"),
34+
Some(14) if libc_ci => println!("cargo:rustc-cfg=freebsd14"),
3435
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
3536
}
3637

@@ -150,6 +151,7 @@ fn which_freebsd() -> Option<i32> {
150151
s if s.starts_with("11") => Some(11),
151152
s if s.starts_with("12") => Some(12),
152153
s if s.starts_with("13") => Some(13),
154+
s if s.starts_with("14") => Some(14),
153155
_ => None,
154156
}
155157
}

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ fn test_freebsd(target: &str) {
17561756
Some(11) => cfg.cfg("freebsd11", None),
17571757
Some(12) => cfg.cfg("freebsd12", None),
17581758
Some(13) => cfg.cfg("freebsd13", None),
1759+
Some(14) => cfg.cfg("freebsd14", None),
17591760
_ => &mut cfg,
17601761
};
17611762

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2624,7 +2624,7 @@ extern "C" {
26242624
}
26252625

26262626
cfg_if! {
2627-
if #[cfg(freebsd13)] {
2627+
if #[cfg(any(freebsd13, freebsd14))] {
26282628
mod freebsd13;
26292629
pub use self::freebsd13::*;
26302630
} else if #[cfg(freebsd12)] {

0 commit comments

Comments
 (0)