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>
* 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"
# 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.