* [Qemu-devel] [PATCH] ivshmem: fix build on a 32 bit system
@ 2010-09-05 18:14 Michael S. Tsirkin
0 siblings, 0 replies; only message in thread
From: Michael S. Tsirkin @ 2010-09-05 18:14 UTC (permalink / raw)
To: cam, qemu-devel, Anthony Liguori
/scm/qemu/hw/ivshmem.c: In function ‘check_shm_size’:
/scm/qemu/hw/ivshmem.c:356: error: format ‘%ld’ expects type ‘long int’,
but argument 4 has type ‘__off64_t’
Fix by casting to u64.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/ivshmem.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index bbb5cba..6f41383 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -352,8 +352,9 @@ static int check_shm_size(IVShmemState *s, int fd) {
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, " than shared object size "
+ "(%" PRIu64 " > %" PRIu64 "d)\n",
+ s->ivshmem_size, (uint64_t)buf.st_size);
return -1;
} else {
return 0;
--
1.7.2.rc0.14.g41c1c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-05 18:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-05 18:14 [Qemu-devel] [PATCH] ivshmem: fix build on a 32 bit system Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.