From 62bd84a2d85543af422b5f5ab7a760fcf2e287d7 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 18 Jul 2024 12:43:01 -0400 Subject: [PATCH] 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;