src/flac/utils.c: Fix for OpenBSD

OpenBSD defineds `TIOCGWINSZ` in `termios.h` which is already being
included, so this fix should work on most POSIX systems.

Closes: https://sourceforge.net/p/flac/bugs/435/
This commit is contained in:
Erik de Castro Lopo 2016-01-26 12:50:44 +11:00
parent 906ccc3901
commit 3ff49e606d
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ int get_console_width(void)
int s[2];
_scrsize (s);
width = s[0];
#elif defined GWINSZ_IN_SYS_IOCTL
#elif defined TIOCGWINSZ
struct winsize w;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1)
width = w.ws_col;