AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(ctype.h pwd.h stdlib.h string.h strings.h sys/time.h sys/mman.h)
-AC_CHECK_HEADERS(sys/ioctl.h termios.h)
+AC_CHECK_HEADERS(termios.h)
AC_CHECK_FUNCS(asprintf)
AC_CHECK_FUNCS(gethostname)
#include "ccache.h"
#include "framework.h"
#include <stdio.h>
-#if defined(HAVE_TERMIOS_H) && defined(HAVE_SYS_IOCTL_H)
+#if defined(HAVE_TERMIOS_H)
#define USE_COLOR
#include <termios.h>
-#include <sys/ioctl.h>
#endif
static unsigned passed_asserts;
{
#ifdef USE_COLOR
struct termios t;
- return ioctl(fd, TCGETS, &t) == 0;
+ return tcgetattr(fd, &t) == 0;
#else
(void)fd;
return 0;