Skip to content

Commit 6fe1ff9

Browse files
committed
Auto merge of #2581 - GuillaumeGomez:freebsd-version, r=Amanieu
Fix invalid freebsd version selection Just realized when working on sysinfo that my `stafs` struct filled by `getmntinfo` was missing **a lot** of information. After trying to find out from my size what I missed, I simply check the `size_of` the rust struct vs the C struct and found `484 != 2384`. After looking a bit more, I discovered that only the CI was using the right freebsd version, which is quite problematic. r? `@Amanieu`
2 parents 6f661a8 + 53e79b8 commit 6fe1ff9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

build.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ fn main() {
2525
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
2626
// running tests to ensure that the ABI is correct.
2727
match which_freebsd() {
28-
Some(10) if libc_ci || rustc_dep_of_std => {
29-
println!("cargo:rustc-cfg=freebsd10")
30-
}
31-
Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"),
32-
Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"),
33-
Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"),
34-
Some(14) if libc_ci => println!("cargo:rustc-cfg=freebsd14"),
28+
Some(10) => println!("cargo:rustc-cfg=freebsd10"),
29+
Some(11) => println!("cargo:rustc-cfg=freebsd11"),
30+
Some(12) => println!("cargo:rustc-cfg=freebsd12"),
31+
Some(13) => println!("cargo:rustc-cfg=freebsd13"),
32+
Some(14) => println!("cargo:rustc-cfg=freebsd14"),
3533
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
3634
}
3735

0 commit comments

Comments
 (0)