Skip to content

Commit

Permalink
Properly define freebsd11 attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzamig committed Jul 21, 2019
1 parent c2c62cc commit 72aa226
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions build.rs
Expand Up @@ -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");
}
Expand Down
15 changes: 6 additions & 9 deletions libc-test/build.rs
Expand Up @@ -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);
Expand Down

0 comments on commit 72aa226

Please sign in to comment.