On Saturday 09 of January 2010 21:00:56 Kamil Dudka wrote: > It looks to me like https://bugzilla.redhat.com/483548 - it has been > discussed several times on this mailing list. You can find it going through > the archive.
As the problem still persists on some systems, it drives me to another idea. Patch attached. > Kamil
From 7ada3e9e3b2a203fd3c47c78b21ae54c686aaa0b Mon Sep 17 00:00:00 2001 From: Kamil Dudka <[email protected]> Date: Sat, 9 Jan 2010 21:18:06 +0100 Subject: [PATCH] ls.c: reorder includes to work around broken <sys/capability.h> --- src/ls.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ls.c b/src/ls.c index aa601fd..54639f1 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" +/* <sys/capability.h> is the last include (if enabled) to avoid clash of include + guards with <sys/types.h> on some premature versions of libcap (rhbz #483548) + */ +#ifdef HAVE_CAP +# include <sys/capability.h> +#endif + #define PROGRAM_NAME (ls_mode == LS_LS ? "ls" \ : (ls_mode == LS_MULTI_COL \ ? "dir" : "vdir")) -- 1.6.5.rc1
