Fix terminal size ioctl number on *BSD (#98)

At least on FreeBSD and OpenBSD, TIOCGWINSZ == 0x40087468 just like on
macOS, so change the definition from not-macOS/macOS to Linux/non-Linux.
This commit is contained in:
Greg 2017-03-24 23:48:36 +03:00 committed by ticki
parent 95233e9e5c
commit 11a0ee178a
1 changed files with 2 additions and 2 deletions

View File

@ -3,10 +3,10 @@ use std::mem;
pub use libc::termios as Termios;
#[cfg(not(target_os = "macos"))]
#[cfg(target_os = "linux")]
pub const TIOCGWINSZ: usize = 0x00005413;
#[cfg(target_os = "macos")]
#[cfg(not(target_os = "linux"))]
pub const TIOCGWINSZ: usize = 0x40087468;
extern {