summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ls.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ls.c b/src/ls.c
index aa601fdc2..9ef7eba21 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -39,10 +39,6 @@
#include <config.h>
#include <sys/types.h>
-#ifdef HAVE_CAP
-# include <sys/capability.h>
-#endif
-
#if HAVE_TERMIOS_H
# include <termios.h>
#endif
@@ -113,6 +109,13 @@
#include "areadlink.h"
#include "mbsalign.h"
+/* Include <sys/capability.h> last to avoid a clash of <sys/types.h>
+ include guards with some premature versions of libcap.
+ For more details, see <http://bugzilla.redhat.com/483548>. */
+#ifdef HAVE_CAP
+# include <sys/capability.h>
+#endif
+
#define PROGRAM_NAME (ls_mode == LS_LS ? "ls" \
: (ls_mode == LS_MULTI_COL \
? "dir" : "vdir"))