Skip to content

Commit 5d663d9

Browse files
committed
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.
1 parent dc6740a commit 5d663d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/term.rs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use libc::{STDOUT_FILENO, c_int, c_ulong, c_ushort};
2020

2121
/// The number of rows and columns of a terminal.
2222
#[cfg(all(feature = "wrap_help", not(target_os = "windows")))]
23+
#[repr(C)]
2324
struct Winsize {
2425
ws_row: c_ushort,
2526
ws_col: c_ushort,

0 commit comments

Comments
 (0)