login: fix termios flag cast type (tcflag_t)
This commit is contained in:
+3
-3
@@ -96,14 +96,14 @@ pub fn spawn_shell<T: Default>(user: &User<T>) -> IoResult<i32> {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user