mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
fix: Declare term::Winsize as repr(C)
The term module uses the struct Winsize directly in a C ioctl call, so it must use C struct representation.
This commit is contained in:
parent
dc6740a5ff
commit
5d663d905c
1 changed files with 1 additions and 0 deletions
|
@ -20,6 +20,7 @@ use libc::{STDOUT_FILENO, c_int, c_ulong, c_ushort};
|
||||||
|
|
||||||
/// The number of rows and columns of a terminal.
|
/// The number of rows and columns of a terminal.
|
||||||
#[cfg(all(feature = "wrap_help", not(target_os = "windows")))]
|
#[cfg(all(feature = "wrap_help", not(target_os = "windows")))]
|
||||||
|
#[repr(C)]
|
||||||
struct Winsize {
|
struct Winsize {
|
||||||
ws_row: c_ushort,
|
ws_row: c_ushort,
|
||||||
ws_col: c_ushort,
|
ws_col: c_ushort,
|
||||||
|
|
Loading…
Reference in a new issue