From 8f5684a1109af72c5b2e184f546b451cf7136d7c Mon Sep 17 00:00:00 2001 From: mounten Date: Sat, 20 Sep 2025 14:21:45 +0200 Subject: [PATCH 1/2] added cfmakeraw definition for target_os = nto --- src/unix/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/unix/mod.rs b/src/unix/mod.rs index a6e6026ec28c3..15e2f65d8117d 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -1834,16 +1834,12 @@ cfg_if! { } cfg_if! { - if #[cfg(target_os = "aix")] { + if #[cfg(any(target_os = "aix", target_os = "nto"))] { extern "C" { pub fn cfmakeraw(termios: *mut crate::termios) -> c_int; pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; } - } else if #[cfg(not(any( - target_os = "solaris", - target_os = "illumos", - target_os = "nto", - )))] { + } else if #[cfg(not(any(target_os = "solaris", target_os = "illumos",)))] { extern "C" { pub fn cfmakeraw(termios: *mut crate::termios); pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; From baf718d23a8aba32a7a2a00bd5f20b82e7c37e13 Mon Sep 17 00:00:00 2001 From: mounten Date: Mon, 22 Sep 2025 19:55:47 +0200 Subject: [PATCH 2/2] added cfsetspeed definition for target_os = nto and target_env = nto80 --- src/unix/mod.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 15e2f65d8117d..432dd31ab9934 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -1837,11 +1837,28 @@ cfg_if! { if #[cfg(any(target_os = "aix", target_os = "nto"))] { extern "C" { pub fn cfmakeraw(termios: *mut crate::termios) -> c_int; - pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; } } else if #[cfg(not(any(target_os = "solaris", target_os = "illumos",)))] { extern "C" { pub fn cfmakeraw(termios: *mut crate::termios); + } + } +} + +cfg_if! { + if #[cfg(any( + target_os = "aix", + all(target_os = "nto", target_env = "nto80") + ))] { + extern "C" { + pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; + } + } else if #[cfg(not(any( + target_os = "solaris", + target_os = "illumos", + target_os = "nto" + )))] { + extern "C" { pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; } }