From 443576a3177fd612885cc2c3c532f91b0dcfbb83 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 269c7aeba3ca..fbec021d1f97 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -1838,16 +1838,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 ba6c97cd81121689e4f14e5201cc6c0b897bdf7b 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 fbec021d1f97..2a0fd17a163d 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -1841,11 +1841,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; } }