aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-29 12:43:15 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2010-10-11 16:34:38 -0500
commit0131c8c2ddeb115c423b8e505789025864d81f87 (patch)
tree76054077e266b9d1a3d0be473d98da0edd71cbfc
parentd3c5b2e6703869bb86639b29102df82380cc2d63 (diff)
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 <avi@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> (cherry picked from commit ad0a4ac1c0e1859eb0c67900dba696cc459b42a7)
-rw-r--r--hw/ivshmem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index afebbc3657..06dce70e78 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;