diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2015-12-13 19:47:17 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2015-12-14 04:10:46 +0300 |
commit | b9eb364823d0d4f9085eb220233c704a13d0f611 (patch) | |
tree | c467cb010df686a043fd5187e472a9470372c6a7 /src | |
parent | f3e6a99676624a7c4338dedd6e029815d3a48adb (diff) |
Fix getting tty window size on more BSDs
src/term.rs:37:39: 37:49 error: unresolved name `TIOCGWINSZ` [E0425]
src/term.rs:37 let result = ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut window);
^~~~~~~~~~
Diffstat (limited to 'src')
-rw-r--r-- | src/term.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/term.rs b/src/term.rs index 87ea242..4f0e000 100644 --- a/src/term.rs +++ b/src/term.rs @@ -22,7 +22,13 @@ struct Winsize { #[cfg(any(target_os = "linux", target_os = "android"))] static TIOCGWINSZ: c_ulong = 0x5413; -#[cfg(any(target_os = "macos", target_os = "ios", target_os = "dragonfly"))] +#[cfg(any(target_os = "macos", + target_os = "ios", + target_os = "bitrig", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd"))] static TIOCGWINSZ: c_ulong = 0x40087468; extern { |