From 5d663d905c9829ce6e7a164f1f0896cdd70236dd Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Wed, 29 Jun 2016 17:22:31 -0700 Subject: [PATCH] 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. --- src/term.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/term.rs b/src/term.rs index 052b9ea8..f4ac97a5 100644 --- a/src/term.rs +++ b/src/term.rs @@ -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,