From: Wei Liu Date: Fri, 29 Apr 2016 17:25:31 +0000 (+0100) Subject: mkelf32: fix compilation on 32 bit build host X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1179 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c2994f8632d56e5379e612daa216401477dccbdb;p=xen.git mkelf32: fix compilation on 32 bit build host When cross-compiling xen on a 32 bit build host: boot/mkelf32.c: In function 'main': boot/mkelf32.c:360:21: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'Elf64_Off' [-Werror=format] cc1: all warnings being treated as errors Fix that by using PRId64 in format string. Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper Reviewed-by: Konrad Rzeszutek Wilk Release-acked-by: Wei Liu --- diff --git a/xen/arch/x86/boot/mkelf32.c b/xen/arch/x86/boot/mkelf32.c index 8c51990325..6cfa312b1e 100644 --- a/xen/arch/x86/boot/mkelf32.c +++ b/xen/arch/x86/boot/mkelf32.c @@ -356,7 +356,7 @@ int main(int argc, char **argv) if ( in64_phdr.p_offset > dat_siz || offset > in64_phdr.p_offset ) { fprintf(stderr, "Expected .note section within .text section!\n" \ - "Offset %ld not within %d!\n", + "Offset %"PRId64" not within %d!\n", in64_phdr.p_offset, dat_siz); return 1; }