summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-07-08 22:54:15 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-07-08 22:54:15 +0000
commitdb7d10bd9d755f4dfbd45aac780bca6b9dd10626 (patch)
tree4520f8aa95a829d43078dfe532d0e840d8036a93
parentcb59a7d3d080130e1eb73193e4630d909543f329 (diff)
downloadcoreutils-db7d10bd9d755f4dfbd45aac780bca6b9dd10626.tar.xz
Include stropt.h if available.
Use HAVE_FIONREAD_IN_SYS_IOCTL instead of _POSIX_SOURCE to decide whether to include <sys/ioctl.h>.
-rw-r--r--src/cat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cat.c b/src/cat.c
index 8f1b2bfc5..a7457bc96 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -27,7 +27,10 @@
#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"