summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.rs3
-rw-r--r--libc-test/build.rs15
2 files changed, 9 insertions, 9 deletions
diff --git a/build.rs b/build.rs
index c43cca36d2..f355447a67 100644
--- a/build.rs
+++ b/build.rs
@@ -16,6 +16,9 @@ fn main() {
}
if env::var("LIBC_CI").is_ok() {
+ if let Some(11) = which_freebsd() {
+ println!("cargo:rustc-cfg=freebsd11");
+ }
if let Some(12) = which_freebsd() {
println!("cargo:rustc-cfg=freebsd12");
}
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 8dffc6819b..02e769ea80 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -1450,15 +1450,12 @@ fn test_freebsd(target: &str) {
let freebsd_ver = which_freebsd();
- if let Some(12) = freebsd_ver {
- // If the host is FreeBSD 12, run FreeBSD 12 tests
- cfg.cfg("freebsd12", None);
- }
-
- if let Some(13) = freebsd_ver {
- // If the host is FreeBSD 12, run FreeBSD 12 tests
- cfg.cfg("freebsd13", None);
- }
+ match freebsd_ver {
+ Some(11) => cfg.cfg("freebsd11", None),
+ Some(12) => cfg.cfg("freebsd12", None),
+ Some(13) => cfg.cfg("freebsd13", None),
+ _ => &mut cfg
+ };
// Required for `getline`:
cfg.define("_WITH_GETLINE", None);