Skip to content

Commit

Permalink
Add basic QNX support
Browse files Browse the repository at this point in the history
  • Loading branch information
flba-eb committed Oct 12, 2022
1 parent 944e81c commit 138f103
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,15 @@ 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
.rfind(before_env)
.map(|i| &target[i + before_env.len()..])
.or(Some(""))
.unwrap();
("qnx", "unix", env)
} else {
panic!("unknown os/family: {}", target)
};
Expand Down

0 comments on commit 138f103

Please sign in to comment.