Skip to content

Commit

Permalink
fix: Declare term::Winsize as repr(C)
Browse files Browse the repository at this point in the history
The term module uses the struct Winsize directly in a C ioctl call, so
it must use C struct representation.
  • Loading branch information
joshtriplett committed Jun 30, 2016
1 parent dc6740a commit 5d663d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5d663d9

Please sign in to comment.