Include stropt.h if available.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Jul 2005 22:54:15 +0000 (22:54 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Jul 2005 22:54:15 +0000 (22:54 +0000)
Use HAVE_FIONREAD_IN_SYS_IOCTL instead of _POSIX_SOURCE
to decide whether to include <sys/ioctl.h>.

src/cat.c

index 8f1b2bf..a7457bc 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
-#ifndef _POSIX_SOURCE
+#if HAVE_STROPT_H
+# include <stropt.h>
+#endif
+#if HAVE_FIONREAD_IN_SYS_IOCTL
 # include <sys/ioctl.h>
 #endif
 #include "system.h"