From 0d5cfddc2c8c34648ff21d99a1e34aae92ff25d0 Mon Sep 17 00:00:00 2001 From: Wade Cline Date: Thu, 20 Sep 2012 14:26:28 -0700 Subject: Btrfs-progs: Fix compiler warnings on PPC64 The kernel uses unsigned long long for u64, but PPC64 uses unsigned long by default. This results in compilation warnings such as: print-tree.c:333: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'u64' To fix this, the macro __KERNEL__ needs to be defined before including the file . This can be done by defining the macro in "kerncompat.h" and making it the first included file in the relevant header files; this fixes the compiler warnings on PPC64. Reviewed-by: David Sterba Signed-off-by: Wade Cline --- mkfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mkfs.c') diff --git a/mkfs.c b/mkfs.c index 47f0c9ca..8fda48a8 100644 --- a/mkfs.c +++ b/mkfs.c @@ -19,6 +19,8 @@ #define _XOPEN_SOURCE 500 #define _GNU_SOURCE +#include "kerncompat.h" + #ifndef __CHECKER__ #include #include @@ -37,7 +39,6 @@ #include #include #include -#include "kerncompat.h" #include "ctree.h" #include "disk-io.h" #include "volumes.h" -- cgit v1.2.3