From 8e5d9144910efb2b2e9555c7d83270b8c3ca18d7 Mon Sep 17 00:00:00 2001 From: Martin Samuelsson Date: Fri, 21 Jul 2023 15:39:15 +0200 Subject: Disable tcsetattr() on illumos and solaris Calling tcsetattr() as currently done by nix is documented undefined behaviour on illumos, and will always fail. For details, please see: https://github.com/nix-rust/nix/issues/2071 --- src/sys/termios.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sys') diff --git a/src/sys/termios.rs b/src/sys/termios.rs index af29d64d..0614cb5e 100644 --- a/src/sys/termios.rs +++ b/src/sys/termios.rs @@ -1161,6 +1161,7 @@ pub fn tcgetattr(fd: Fd) -> Result { /// `tcsetattr()` reconfigures the given port based on a given `Termios` structure. This change /// takes affect at a time specified by `actions`. Note that this function may return success if /// *any* of the parameters were successfully set, not only if all were set successfully. +#[cfg(not(any(target_os = "illumos", target_os = "solaris",)))] pub fn tcsetattr( fd: Fd, actions: SetArg, -- cgit v1.2.3