diff --git a/src/lib.rs b/src/lib.rs index 52a8d90b7b..bef973455b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,14 +96,14 @@ pub fn spawn_shell(user: &User) -> IoResult { unsafe { let mut t: libc::termios = core::mem::zeroed(); if libc::tcgetattr(0, &mut t) == 0 { - t.c_iflag |= (libc::ICRNL | libc::IXON) as _; - t.c_oflag |= (libc::OPOST | libc::ONLCR) as _; + t.c_iflag |= (libc::ICRNL | libc::IXON) as libc::tcflag_t; + t.c_oflag |= (libc::OPOST | libc::ONLCR) as libc::tcflag_t; t.c_lflag |= (libc::ICANON | libc::ECHO | libc::ECHOE | libc::ECHOK | libc::ISIG - | libc::IEXTEN) as _; + | libc::IEXTEN) as libc::tcflag_t; t.c_cc[libc::VMIN] = 1; t.c_cc[libc::VTIME] = 0; let _ = libc::tcsetattr(0, libc::TCSANOW, &t);