Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
AC_C_VARARRAYS
AC_C_TYPEOF
-AC_CHECK_HEADERS([stdint.h inttypes.h byteswap.h sys/param.h])
+AC_CHECK_HEADERS([stdint.h inttypes.h byteswap.h sys/param.h termios.h])
+
+AC_HEADER_TIOCGWINSZ
XIPH_C_BSWAP32
#include "share/compat.h"
#ifndef _WIN32
#include <wchar.h>
-#include <sys/ioctl.h>
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+#ifdef GWINSZ_IN_SYS_IOCTL
+# include <sys/ioctl.h>
+#endif
#endif
const char *CHANNEL_MASK_TAG = "WAVEFORMATEXTENSIBLE_CHANNEL_MASK";