Skip to content

Commit e3249e7

Browse files
flba-ebgitbot
authored and
gitbot
committed
Add new target for supporting Neutrino QNX 6.1 with io-socket network stack on aarch64
Signed-off-by: Florian Bartels <[email protected]>
1 parent df89792 commit e3249e7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

std/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ test = true
139139
level = "warn"
140140
check-cfg = [
141141
'cfg(bootstrap)',
142-
'cfg(target_arch, values("xtensa"))',
142+
'cfg(target_arch, values("xtensa", "aarch64-unknown-nto-qnx710_iosock"))',
143+
'cfg(target_env, values("nto71_iosock"))',
143144
# std use #[path] imports to portable-simd `std_float` crate
144145
# and to the `backtrace` crate which messes-up with Cargo list
145146
# of declared features, we therefor expect any feature cfg

std/src/sys/pal/unix/process/process_unix.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::{fmt, mem, sys};
2020

2121
cfg_if::cfg_if! {
2222
// This workaround is only needed for QNX 7.0 and 7.1. The bug should have been fixed in 8.0
23-
if #[cfg(any(target_env = "nto70", target_env = "nto71"))] {
23+
if #[cfg(any(target_env = "nto70", target_env = "nto71", target_env = "nto71_iosock"))] {
2424
use crate::thread;
2525
use libc::{c_char, posix_spawn_file_actions_t, posix_spawnattr_t};
2626
use crate::time::Duration;
@@ -191,7 +191,8 @@ impl Command {
191191
target_os = "watchos",
192192
target_os = "tvos",
193193
target_env = "nto70",
194-
target_env = "nto71"
194+
target_env = "nto71",
195+
target_env = "nto71_iosock",
195196
)))]
196197
unsafe fn do_fork(&mut self) -> Result<pid_t, io::Error> {
197198
cvt(libc::fork())
@@ -202,7 +203,7 @@ impl Command {
202203
// Documentation says "... or try calling fork() again". This is what we do here.
203204
// See also https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.lib_ref/topic/f/fork.html
204205
// This workaround is only needed for QNX 7.0 and 7.1. The bug should have been fixed in 8.0
205-
#[cfg(any(target_env = "nto70", target_env = "nto71"))]
206+
#[cfg(any(target_env = "nto70", target_env = "nto71", target_env = "nto71_iosock"))]
206207
unsafe fn do_fork(&mut self) -> Result<pid_t, io::Error> {
207208
use crate::sys::os::errno;
208209

0 commit comments

Comments
 (0)