From c781e19b9184b784d0c41ec646b54ee7d2cda59f Mon Sep 17 00:00:00 2001 From: Alan Cruz <126849283+aacruzgon@users.noreply.github.com> Date: Thu, 12 Nov 2026 10:51:56 -0500 Subject: [PATCH] Add RTLD_* values for target_os = "qnx" (QNX SDP 8.0) 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. --- src/os/unix/consts.rs | 4 ++++ tests/library_filename.rs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/os/unix/consts.rs b/src/os/unix/consts.rs index 2ef81aac8..f7915c69e 100644 --- a/src/os/unix/consts.rs +++ b/src/os/unix/consts.rs @@ -87,6 +87,7 @@ mod posix { target_os = "fuchsia", target_os = "redox", target_os = "nto", + target_os = "qnx", target_os = "hurd", target_os = "cygwin", ))] { @@ -128,6 +129,7 @@ mod posix { target_os = "fuchsia", target_os = "redox", target_os = "nto", + target_os = "qnx", target_os = "hurd", target_os = "cygwin", ))] { @@ -183,6 +185,7 @@ mod posix { target_os = "fuchsia", target_os = "redox", target_os = "nto", + target_os = "qnx", target_os = "hurd", ))] { pub(super) const RTLD_GLOBAL: c_int = 0x100; @@ -197,6 +200,7 @@ mod posix { if #[cfg(any( target_os = "netbsd", target_os = "nto", + target_os = "qnx", ))] { pub(super) const RTLD_LOCAL: c_int = 0x200; } else if #[cfg(target_os = "aix")] { diff --git a/tests/library_filename.rs b/tests/library_filename.rs index 7029e0a72..be2f5b858 100644 --- a/tests/library_filename.rs +++ b/tests/library_filename.rs @@ -10,6 +10,8 @@ mod test { const EXPECTED: &str = "libaudioengine.so"; #[cfg(target_os = "macos")] const EXPECTED: &str = "libaudioengine.dylib"; + #[cfg(target_os = "qnx")] + const EXPECTED: &str = "libaudioengine.so"; #[test] fn test_library_filename() {