Skip to content

Commit 31f664f

Browse files
authored
Add RTLD_* values for target_os = "qnx" (QNX SDP 8.0) (#201)
rust-lang/rust#158449 renamed the QNX SDP 8.0 targets to aarch64-unknown-qnx and x86_64-pc-qnx with target_os = "qnx". SDP 8.0 uses the same RTLD_* values as 7.x, so add "qnx" next to "nto". Also give tests/library_filename.rs an expected name for QNX.
1 parent f5dc3b8 commit 31f664f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/os/unix/consts.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ mod posix {
8787
target_os = "fuchsia",
8888
target_os = "redox",
8989
target_os = "nto",
90+
target_os = "qnx",
9091
target_os = "hurd",
9192
target_os = "cygwin",
9293
))] {
@@ -128,6 +129,7 @@ mod posix {
128129
target_os = "fuchsia",
129130
target_os = "redox",
130131
target_os = "nto",
132+
target_os = "qnx",
131133
target_os = "hurd",
132134
target_os = "cygwin",
133135
))] {
@@ -183,6 +185,7 @@ mod posix {
183185
target_os = "fuchsia",
184186
target_os = "redox",
185187
target_os = "nto",
188+
target_os = "qnx",
186189
target_os = "hurd",
187190
))] {
188191
pub(super) const RTLD_GLOBAL: c_int = 0x100;
@@ -197,6 +200,7 @@ mod posix {
197200
if #[cfg(any(
198201
target_os = "netbsd",
199202
target_os = "nto",
203+
target_os = "qnx",
200204
))] {
201205
pub(super) const RTLD_LOCAL: c_int = 0x200;
202206
} else if #[cfg(target_os = "aix")] {

‎tests/library_filename.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ mod test {
1010
const EXPECTED: &str = "libaudioengine.so";
1111
#[cfg(target_os = "macos")]
1212
const EXPECTED: &str = "libaudioengine.dylib";
13+
#[cfg(target_os = "qnx")]
14+
const EXPECTED: &str = "libaudioengine.so";
1315

1416
#[test]
1517
fn test_library_filename() {

0 commit comments

Comments
 (0)