From 62bd84a2d85543af422b5f5ab7a760fcf2e287d7 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. (apply to `main`) (cherry picked from commit 0f4d2f702d31a20fff8800d05ff9b549ddf33bf1) --- 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 f00d710bbac02..96229ce564c21 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -2864,9 +2864,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 78b639cef27b5c4319a5eb89d7426c74b9bd1caf 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 (apply to `main`) (cherry picked from commit aea287e5178a87dd2db071f311074fcb9663e518) --- 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 96229ce564c21..a13390afe9574 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -2864,7 +2864,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" {