From: Pádraig Brady
Date: Thu, 28 Nov 2013 02:23:11 +0000 (+0000) Subject: build: fix selinux.c build failure on 32 bit X-Git-Tag: v8.22~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=142baf67407e1766f83cf000c9269a66048773b5;p=thirdparty%2Fcoreutils.git build: fix selinux.c build failure on 32 bit * src/selinux.c: Don't include the system "fts.h" as that disallows _FILE_OFFSET_BITS=64 which gnulib auto enables to support large files on 32 bit systems. Instead include our "xfts.h" which includes the less limited gnulib replacement, and also a checked version of xfts_open(). (restorecon): Use the checked xfts_open() rather than the standard fts_open(). Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/6934169 --- diff --git a/src/selinux.c b/src/selinux.c index c87e896895..680bc492e5 100644 --- a/src/selinux.c +++ b/src/selinux.c @@ -25,7 +25,7 @@ #include "system.h" #include "canonicalize.h" #include "dosname.h" -#include "fts.h" +#include "xfts.h" #include "quote.h" #include "selinux.h" @@ -303,7 +303,7 @@ restorecon (char const *path, bool recurse, bool local) return ok; } - fts = fts_open ((char *const *) ftspath, FTS_PHYSICAL, NULL); + fts = xfts_open ((char *const *) ftspath, FTS_PHYSICAL, NULL); while (1) { FTSENT *ent; @@ -313,7 +313,6 @@ restorecon (char const *path, bool recurse, bool local) { if (errno != 0) { - /* FIXME: try to give a better message */ error (0, errno, _("fts_read failed")); ok = false; }