From: Kamil Dudka Date: Sat, 9 Jan 2010 20:18:06 +0000 (+0100) Subject: ls: reorder includes to work around broken X-Git-Tag: v8.4~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6454dd0f2f792850453379ba081ca74eed15c2d9;p=thirdparty%2Fcoreutils.git ls: reorder includes to work around broken * src/ls.c: Include later, to avoid build failure with a header from libcap-2.16-1 or earlier. See http://bugzilla.redhat.com/483548 for details. --- diff --git a/NEWS b/NEWS index 3b382e9362..04a75cd6f4 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ GNU coreutils NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** Build-related + + Work around a build failure when using buggy . + Alternatively, configure with --disable-libcap. + * Noteworthy changes in release 8.3 (2010-01-07) [stable] diff --git a/src/ls.c b/src/ls.c index aa601fdc2b..9ef7eba21b 100644 --- a/src/ls.c +++ b/src/ls.c @@ -39,10 +39,6 @@ #include #include -#ifdef HAVE_CAP -# include -#endif - #if HAVE_TERMIOS_H # include #endif @@ -113,6 +109,13 @@ #include "areadlink.h" #include "mbsalign.h" +/* Include last to avoid a clash of + include guards with some premature versions of libcap. + For more details, see . */ +#ifdef HAVE_CAP +# include +#endif + #define PROGRAM_NAME (ls_mode == LS_LS ? "ls" \ : (ls_mode == LS_MULTI_COL \ ? "dir" : "vdir"))