Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/backend/libc/termios/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,20 @@ pub(crate) fn set_input_speed(termios: &mut Termios, arbitrary_speed: u32) -> io
#[cfg(not(any(target_os = "espidf", target_os = "nto", target_os = "wasi")))]
#[inline]
pub(crate) fn cfmakeraw(termios: &mut Termios) {
unsafe { c::cfmakeraw(as_mut_ptr(termios).cast()) }
unsafe {
// On AIX, cfmakeraw() has a return type of 'int' instead of 'void'.
// If the argument 'termios' is NULL, it returns -1; otherwise, it returns 0.
// We believe it is safe to ignore the return value.
#[cfg(target_os = "aix")]
{
let _ = c::cfmakeraw(as_mut_ptr(termios).cast());
}

#[cfg(not(target_os = "aix"))]
{
c::cfmakeraw(as_mut_ptr(termios).cast());
}
}
}

pub(crate) fn isatty(fd: BorrowedFd<'_>) -> bool {
Expand Down
Loading