Skip to content

Commit f081694

Browse files
committed
Always pass freebsd11 - otherwise cross-compiling to FreeBSD fails
1 parent eb9f523 commit f081694

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

build.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,11 @@ fn main() {
2121
//
2222
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
2323
// running tests to ensure that the ABI is correct.
24-
#[cfg(target_os = "freebsd")]
2524
match which_freebsd() {
2625
Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"),
2726
Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"),
2827
Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"),
29-
Some(_) => println!("cargo:rustc-cfg=freebsd11"),
30-
None =>
31-
/* not FreeBSD - nothing to do here */
32-
{
33-
()
34-
}
28+
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
3529
}
3630

3731
// Rust >= 1.15 supports private module use:
@@ -94,7 +88,6 @@ fn rustc_minor_version() -> Option<u32> {
9488
otry!(pieces.next()).parse().ok()
9589
}
9690

97-
#[cfg(target_os = "freebsd")]
9891
fn which_freebsd() -> Option<i32> {
9992
let output = std::process::Command::new("freebsd-version").output().ok();
10093
if output.is_none() {

0 commit comments

Comments
 (0)