Auto merge of #550 - joshtriplett:term-winsize-c, r=kbknapp

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:
Homu 2016-06-30 10:54:39 +09:00
commit 40017ed091

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.
#[cfg(all(feature = "wrap_help", not(target_os = "windows")))]
#[repr(C)]
struct Winsize {
ws_row: c_ushort,
ws_col: c_ushort,