]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: rework includes for statx structures
authorEric Sandeen <sandeen@redhat.com>
Fri, 3 May 2019 16:51:37 +0000 (11:51 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 3 May 2019 16:51:37 +0000 (11:51 -0500)
Only include the kernel's linux/stat.h headers if we haven't
already picked up statx bits from glibc, to avoid redefinition.

Suggested-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Tested-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/stat.c
io/statx.h

index 517be66ed52b471f80c299c821b308eff12ae81a..37c0b2e81516e4008ed54fe1f28cca484faa3f3f 100644 (file)
--- a/io/stat.c
+++ b/io/stat.c
@@ -6,9 +6,6 @@
  * Portions of statx support written by David Howells (dhowells@redhat.com)
  */
 
-/* Try to pick up statx definitions from the system headers. */
-#include <linux/stat.h>
-
 #include "command.h"
 #include "input.h"
 #include "init.h"
index 4f40eaa16d68e9bb691a94cd3f1b22ece319dcf7..c6625ac431bfc9ffe2b17f3cac958bc92980488b 100644 (file)
 # endif
 #endif
 
+
+#ifndef STATX_TYPE
+/* Pick up kernel definitions if glibc didn't already provide them */
+#include <linux/stat.h>
+#endif
+
 #ifndef STATX_TYPE
+/* Local definitions if glibc & kernel headers didn't already provide them */
 
 /*
  * Timestamp structure for the timestamps in struct statx.