summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2019-08-15 06:55:13 +0200
committergnzlbg <gonzalobg88@gmail.com>2019-08-15 06:55:13 +0200
commitf0816947c9e7b975285b178b417b2601744af270 (patch)
tree13f0a54d82b76a19fc57e58939e6e23b647da98f /build.rs
parenteb9f523e657789ab3fd3a3078c6327b5cd0aa443 (diff)
downloadrust-libc-f0816947c9e7b975285b178b417b2601744af270.tar.gz
Always pass freebsd11 - otherwise cross-compiling to FreeBSD fails
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/build.rs b/build.rs
index 339eb19556..efc95b6627 100644
--- a/build.rs
+++ b/build.rs
@@ -21,17 +21,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.
- #[cfg(target_os = "freebsd")]
match which_freebsd() {
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(_) => println!("cargo:rustc-cfg=freebsd11"),
- None =>
- /* not FreeBSD - nothing to do here */
- {
- ()
- }
+ Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
}
// Rust >= 1.15 supports private module use:
@@ -94,7 +88,6 @@ fn rustc_minor_version() -> Option<u32> {
otry!(pieces.next()).parse().ok()
}
-#[cfg(target_os = "freebsd")]
fn which_freebsd() -> Option<i32> {
let output = std::process::Command::new("freebsd-version").output().ok();
if output.is_none() {