xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.7] mkelf32: fix compilation on 32 bit build host
@ 2016-04-29 17:25 Wei Liu
  2016-04-29 17:26 ` Andrew Cooper
  2016-04-29 17:26 ` Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Liu @ 2016-04-29 17:25 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Wei Liu, Jan Beulich

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 <wei.liu2@citrix.com>
---
 xen/arch/x86/boot/mkelf32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/boot/mkelf32.c b/xen/arch/x86/boot/mkelf32.c
index 8c51990..6cfa312 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;
         }
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-29 17:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 17:25 [PATCH for-4.7] mkelf32: fix compilation on 32 bit build host Wei Liu
2016-04-29 17:26 ` Andrew Cooper
2016-04-29 17:26 ` Konrad Rzeszutek Wilk
2016-04-29 17:28   ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).