]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stat: fix enabling of statx logic
authorJeff Layton <jlayton@kernel.org>
Fri, 14 Jun 2019 18:37:43 +0000 (14:37 -0400)
committerPádraig Brady <P@draigBrady.com>
Fri, 14 Jun 2019 21:43:46 +0000 (22:43 +0100)
* src/stat.c: STATX_INO isn't defined until stat.h is included.
Move the test down so it works properly.

src/stat.c

index 3bb84f35d4c008c5ed77a8851a4bfcbaf86b2719..ec0bb7de496c60e64a30196dddfb5a96500da9be 100644 (file)
 # define USE_STATVFS 0
 #endif
 
-#if HAVE_STATX && defined STATX_INO
-# define USE_STATX 1
-#else
-# define USE_STATX 0
-#endif
-
 #include <stddef.h>
 #include <stdio.h>
 #include <stdalign.h>
 #include "find-mount-point.h"
 #include "xvasprintf.h"
 
+#if HAVE_STATX && defined STATX_INO
+# define USE_STATX 1
+#else
+# define USE_STATX 0
+#endif
+
 #if USE_STATVFS
 # define STRUCT_STATXFS_F_FSID_IS_INTEGER STRUCT_STATVFS_F_FSID_IS_INTEGER
 # define HAVE_STRUCT_STATXFS_F_TYPE HAVE_STRUCT_STATVFS_F_TYPE