Btrfs-progs: Fix compiler warnings on PPC64
authorWade Cline <clinew@linux.vnet.ibm.com>
Thu, 20 Sep 2012 21:26:28 +0000 (14:26 -0700)
committerDavid Sterba <dsterba@suse.cz>
Thu, 17 Jan 2013 17:12:57 +0000 (18:12 +0100)
commit0d5cfddc2c8c34648ff21d99a1e34aae92ff25d0
treee3a46250fc213e97da9292995983068fd9581961
parent91d9eec1ff044394f2b98ee7fcb76713dd33b994
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>
cmds-receive.c
cmds-scrub.c
cmds-send.c
convert.c
kerncompat.h
mkfs.c
restore.c