summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ls.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ls.c b/src/ls.c
index 429e68b11..31b9ac973 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -38,13 +38,16 @@
#include <config.h>
#include <sys/types.h>
-#if !defined(_POSIX_SOURCE) || defined(_AIX)
-#include <sys/ioctl.h>
+
+#if HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
#endif
+
#include <stdio.h>
#include <grp.h>
#include <pwd.h>
#include <getopt.h>
+
#if HAVE_LIMITS_H
/* limits.h must come before system.h because limits.h on some systems
undefs PATH_MAX, whereas system.h includes pathmax.h which sets