diff options
author | Thomas Zander <thomas.e.zander@googlemail.com> | 2021-05-29 14:19:40 +0200 |
---|---|---|
committer | Thomas Zander <thomas.e.zander@googlemail.com> | 2021-05-29 14:19:40 +0200 |
commit | 09d12f8cbd27efa99db47dc412a09872565ecd86 (patch) | |
tree | 460018db822d96d319422941e6c1642b6ef52992 /zellij-server/src/os_input_output.rs | |
parent | 00bbe2b0f83cb1c4f5c121bc7c10fb5d3e523bab (diff) |
Fix build on platforms with TIOCGWINSZ / ioctl() integer type mismatch.
Diffstat (limited to 'zellij-server/src/os_input_output.rs')
-rw-r--r-- | zellij-server/src/os_input_output.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zellij-server/src/os_input_output.rs b/zellij-server/src/os_input_output.rs index 4cda73ed5..91a228e72 100644 --- a/zellij-server/src/os_input_output.rs +++ b/zellij-server/src/os_input_output.rs @@ -41,7 +41,11 @@ pub(crate) fn set_terminal_size_using_fd(fd: RawFd, columns: u16, rows: u16) { ws_xpixel: 0, ws_ypixel: 0, }; - unsafe { ioctl(fd, TIOCSWINSZ, &winsize) }; + // TIOCGWINSZ is an u32, but the second argument to ioctl is u64 on + // some platforms. When checked on Linux, clippy will complain about + // useless conversion. + #[allow(clippy::useless_conversion)] + unsafe { ioctl(fd, TIOCSWINSZ.into(), &winsize) }; } /// Handle some signals for the child process. This will loop until the child |