From: Avi Kivity Date: Sun, 29 Aug 2010 09:43:15 +0000 (+0300) Subject: Fix ivshmem build on 32-bit hosts X-Git-Tag: v0.14.0-rc0~734 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad0a4ac1c0e1859eb0c67900dba696cc459b42a7;p=thirdparty%2Fqemu.git Fix ivshmem build on 32-bit hosts stat() fields can be more or less anything depending on configuration, cast explicitly to uint64_t to avoid printf() format mismatches. Signed-off-by: Avi Kivity Signed-off-by: Blue Swirl --- diff --git a/hw/ivshmem.c b/hw/ivshmem.c index afebbc3657a..06dce70e786 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -351,9 +351,10 @@ static int check_shm_size(IVShmemState *s, int fd) { fstat(fd, &buf); if (s->ivshmem_size > buf.st_size) { - fprintf(stderr, "IVSHMEM ERROR: Requested memory size greater"); - fprintf(stderr, " than shared object size (%" PRIu64 " > %ld)\n", - s->ivshmem_size, buf.st_size); + fprintf(stderr, + "IVSHMEM ERROR: Requested memory size greater" + " than shared object size (%" PRIu64 " > %" PRIu64")\n", + s->ivshmem_size, (uint64_t)buf.st_size); return -1; } else { return 0;