From 0f4d2f702d31a20fff8800d05ff9b549ddf33bf1 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 18 Jul 2024 12:43:01 -0400 Subject: [PATCH 1/2] Disable `libregex` for QNX 7.0 `libregex` did not exist until QNX 7.1. Before that, the regex functions were part of the libc. --- src/unix/nto/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index d7aa52bc9eae3..08ed90ef8bc14 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -2865,9 +2865,9 @@ safe_f! { // Network related functions are provided by libsocket and regex // functions are provided by libregex. +// Note that in QNX <=7.0, libregex functions were included it in libc itself. #[link(name = "socket")] -#[link(name = "regex")] - +#[cfg_attr(not(target_env = "nto70"), link(name = "regex"))] extern "C" { pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; From aea287e5178a87dd2db071f311074fcb9663e518 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Thu, 18 Jul 2024 10:13:49 -0700 Subject: [PATCH 2/2] Tweak comment --- src/unix/nto/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index 08ed90ef8bc14..73fd2ba9f49fc 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -2865,7 +2865,7 @@ safe_f! { // Network related functions are provided by libsocket and regex // functions are provided by libregex. -// Note that in QNX <=7.0, libregex functions were included it in libc itself. +// In QNX <=7.0, libregex functions were included in libc itself. #[link(name = "socket")] #[cfg_attr(not(target_env = "nto70"), link(name = "regex"))] extern "C" {