]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: fix selinux.c build failure on 32 bit
authorPádraig Brady <P@draigBrady.com>
Thu, 28 Nov 2013 02:23:11 +0000 (02:23 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 28 Nov 2013 02:29:00 +0000 (02:29 +0000)
* 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

src/selinux.c

index c87e896895f455a8ece715b2e1a69121afa5a750..680bc492e5ef2d1a7abd443df7141114b1bc0704 100644 (file)
@@ -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;
             }