diff options
author | Luca Pizzamiglio <luca.pizzamiglio@gmail.com> | 2019-07-21 18:10:40 +0200 |
---|---|---|
committer | Luca Pizzamiglio <luca.pizzamiglio@gmail.com> | 2019-07-28 23:00:53 +0200 |
commit | 64bc745405116ff5eaa0358fb46bc2233e0756a7 (patch) | |
tree | c9434807623499467459517aa5aff7c1e11040e1 /libc-test | |
parent | bde8b842a48aee64b7a2f1746aebce1013474cf5 (diff) | |
download | rust-libc-64bc745405116ff5eaa0358fb46bc2233e0756a7.tar.gz |
Properly define freebsd11 attribute
Diffstat (limited to 'libc-test')
-rw-r--r-- | libc-test/build.rs | 15 |
1 files changed, 6 insertions, 9 deletions
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); |