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:
Josh Triplett 2016-06-29 17:22:31 -07:00
parent dc6740a5ff
commit 5d663d905c

View file

@ -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,