Commit 3ff49e60 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

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/
parent 906ccc39
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment