diff --git a/crates/util/keyfork-crossterm-ioctl-shim/src/lib.rs b/crates/util/keyfork-crossterm-ioctl-shim/src/lib.rs index 9e6792a..683d0cf 100644 --- a/crates/util/keyfork-crossterm-ioctl-shim/src/lib.rs +++ b/crates/util/keyfork-crossterm-ioctl-shim/src/lib.rs @@ -55,7 +55,7 @@ impl TerminalIoctl { fn get_termios(&self) -> Result { let mut termios = unsafe { std::mem::zeroed() }; - assert_io(unsafe { libc::tcgetattr(self.fd, &mut termios) })?; + assert_io(unsafe { libc::tcgetattr(self.fd, &raw mut termios) })?; Ok(termios) } @@ -71,8 +71,8 @@ impl TerminalIoctl { let mut termios = self.get_termios()?; let original_mode_ios = termios; - unsafe { libc::cfmakeraw(&mut termios) }; - assert_io(unsafe { libc::tcsetattr(self.fd, libc::TCSANOW, &termios) })?; + unsafe { libc::cfmakeraw(&raw mut termios) }; + assert_io(unsafe { libc::tcsetattr(self.fd, libc::TCSANOW, &raw const termios) })?; self.stored_termios = Some(original_mode_ios); } Ok(()) @@ -87,7 +87,7 @@ impl TerminalIoctl { /// The method may propagate errors encountered when interacting with the terminal. pub fn disable_raw_mode(&mut self) -> Result<()> { if let Some(termios) = self.stored_termios.take() { - assert_io(unsafe { libc::tcsetattr(self.fd, libc::TCSANOW, &termios) })?; + assert_io(unsafe { libc::tcsetattr(self.fd, libc::TCSANOW, &raw const termios) })?; } Ok(()) } @@ -107,7 +107,7 @@ impl TerminalIoctl { ws_ypixel: 0, }; - assert_io(unsafe { libc::ioctl(self.fd, libc::TIOCGWINSZ, &mut size) })?; + assert_io(unsafe { libc::ioctl(self.fd, libc::TIOCGWINSZ, &raw mut size) })?; Ok((size.ws_col, size.ws_row)) } }