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:
parent
95233e9e5c
commit
11a0ee178a
|
@ -3,10 +3,10 @@ use std::mem;
|
||||||
|
|
||||||
pub use libc::termios as Termios;
|
pub use libc::termios as Termios;
|
||||||
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(target_os = "linux")]
|
||||||
pub const TIOCGWINSZ: usize = 0x00005413;
|
pub const TIOCGWINSZ: usize = 0x00005413;
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(not(target_os = "linux"))]
|
||||||
pub const TIOCGWINSZ: usize = 0x40087468;
|
pub const TIOCGWINSZ: usize = 0x40087468;
|
||||||
|
|
||||||
extern {
|
extern {
|
||||||
|
|
Loading…
Reference in New Issue