diff --git a/src/backend/linux_raw/termios/syscalls.rs b/src/backend/linux_raw/termios/syscalls.rs index 07c3a3d95..9b84c861c 100644 --- a/src/backend/linux_raw/termios/syscalls.rs +++ b/src/backend/linux_raw/termios/syscalls.rs @@ -44,7 +44,9 @@ pub(crate) fn tcgetattr(fd: BorrowedFd<'_>) -> io::Result { // `TCGETS2`, for example a seccomp environment or WSL that only // knows about `TCGETS`. Fall back to the old `TCGETS`. #[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] - Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) => tcgetattr_fallback(fd), + Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) | Err(io::Errno::INVAL) => { + tcgetattr_fallback(fd) + } Err(err) => Err(err), } @@ -148,7 +150,7 @@ pub(crate) fn tcsetattr( // Similar to `tcgetattr_fallback`, `NOTTY` or `ACCESS` might mean // the OS doesn't support `TCSETS2`. Fall back to the old `TCSETS`. #[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] - Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) => { + Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) | Err(io::Errno::INVAL) => { tcsetattr_fallback(fd, optional_actions, termios) }