Skip to content

Commit

Permalink
Fix QNX/nto support of 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
flba-eb committed Nov 14, 2022
1 parent f419830 commit 494273a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,15 +1123,17 @@ fn default_cfg(target: &str) -> Vec<(String, Option<String>)> {
("vxworks", "unix", "")
} else if target.contains("haiku") {
("haiku", "unix", "")
} else if target.contains("qnx") {
// Set an environment string if provided, empty str otherwise
let before_env = "-qnx-";
let env = target
} else if target.contains("nto-qnx") {
let before_env = "nto-qnx";
let version = target
.rfind(before_env)
.map(|i| &target[i + before_env.len()..])
.or(Some(""))
.unwrap();
("qnx", "unix", env)
let env = match version {
"7.1.0" => "nto71",
_ => panic!("Uknown version"),
};
("nto", "unix", env)
} else {
panic!("unknown os/family: {}", target)
};
Expand Down

0 comments on commit 494273a

Please sign in to comment.