diff options
author | Wade Cline <clinew@linux.vnet.ibm.com> | 2012-09-20 14:26:28 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-01-17 18:12:57 +0100 |
commit | 0d5cfddc2c8c34648ff21d99a1e34aae92ff25d0 (patch) | |
tree | e3a46250fc213e97da9292995983068fd9581961 /cmds-scrub.c | |
parent | 91d9eec1ff044394f2b98ee7fcb76713dd33b994 (diff) |
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 <asm/types.h>. 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 <dsterba@suse.cz>
Signed-off-by: Wade Cline <clinew@linux.vnet.ibm.com>
Diffstat (limited to 'cmds-scrub.c')
-rw-r--r-- | cmds-scrub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds-scrub.c b/cmds-scrub.c index 24be20ff..e29db27d 100644 --- a/cmds-scrub.c +++ b/cmds-scrub.c @@ -16,6 +16,8 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" + #include <sys/ioctl.h> #include <sys/wait.h> #include <sys/stat.h> |