Skip to content

Commit

Permalink
Merge pull request #42 from flba-eb/add_qnx_support
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 14, 2022
2 parents 2c609e2 + 3d3a0b1 commit 0db6046
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 0db6046

Please sign in to comment.