Skip to content

Commit d9c286c

Browse files
committed
Change the cfmakeraw() wrapper to handle the difference in its return type on AIX.
1 parent 224daf0 commit d9c286c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/backend/libc/termios/syscalls.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,17 @@ pub(crate) fn set_input_speed(termios: &mut Termios, arbitrary_speed: u32) -> io
493493
#[cfg(not(any(target_os = "espidf", target_os = "nto", target_os = "wasi")))]
494494
#[inline]
495495
pub(crate) fn cfmakeraw(termios: &mut Termios) {
496-
unsafe { c::cfmakeraw(as_mut_ptr(termios).cast()) }
496+
unsafe {
497+
#[cfg(target_os = "aix")]
498+
{
499+
let _ = c::cfmakeraw(as_mut_ptr(termios).cast());
500+
}
501+
502+
#[cfg(not(target_os = "aix"))]
503+
{
504+
c::cfmakeraw(as_mut_ptr(termios).cast());
505+
}
506+
}
497507
}
498508

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

0 commit comments

Comments
 (0)