aboutsummaryrefslogtreecommitdiff
path: root/hw/ivshmem.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-29 12:43:15 +0300
committerBlue Swirl <blauwirbel@gmail.com>2010-09-04 09:53:53 +0000
commitad0a4ac1c0e1859eb0c67900dba696cc459b42a7 (patch)
tree70713bfa018c76eff8c0cbf2abc97f3d9fe5024c /hw/ivshmem.c
parentc93031e56a7fe0f22dd4ece50d25d5f3af221cfa (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>
Diffstat (limited to 'hw/ivshmem.c')
-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;