Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for QNX operating system #42

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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