summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-09 02:11:58 +0000
committerbors <bors@rust-lang.org>2021-12-09 02:11:58 +0000
commit6fe1ff94948e805c0d20970adaa73ebdd4fd7d1b (patch)
treec628c3433fb5c23da1cde0f12d4537a1bf6e1fda
parent6f661a87189a1ea13448d9c05502166ad9fc8f7f (diff)
parent53e79b886bf4e4d3682ae6669e3585b3586e5255 (diff)
downloadrust-libc-6fe1ff94948e805c0d20970adaa73ebdd4fd7d1b.tar.gz
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`
-rw-r--r--build.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/build.rs b/build.rs
index 61acba646d..39eeb3b785 100644
--- a/build.rs
+++ b/build.rs
@@ -25,13 +25,11 @@ fn main() {
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
// running tests to ensure that the ABI is correct.
match which_freebsd() {
- Some(10) if libc_ci || rustc_dep_of_std => {
- println!("cargo:rustc-cfg=freebsd10")
- }
- 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(10) => println!("cargo:rustc-cfg=freebsd10"),
+ Some(11) => println!("cargo:rustc-cfg=freebsd11"),
+ Some(12) => println!("cargo:rustc-cfg=freebsd12"),
+ Some(13) => println!("cargo:rustc-cfg=freebsd13"),
+ Some(14) => println!("cargo:rustc-cfg=freebsd14"),
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
}