Use location of TIOCGWINSZ from autoconf manual
authorDagobert Michelsen <dam@opencsw.org>
Sun, 26 May 2013 21:32:01 +0000 (23:32 +0200)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 27 May 2013 08:06:56 +0000 (18:06 +1000)
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
configure.ac
src/flac/utils.c

index 6355f72..2f3824c 100644 (file)
@@ -59,7 +59,9 @@ AC_C_INLINE
 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
 
index f624235..9e08bf4 100644 (file)
 #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";