]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Fix ivshmem build on 32-bit hosts
authorAvi Kivity <avi@redhat.com>
Sun, 29 Aug 2010 09:43:15 +0000 (12:43 +0300)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 4 Sep 2010 09:53:53 +0000 (09:53 +0000)
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>
hw/ivshmem.c

index afebbc3657ac46a73a28a184fd70796d2c230388..06dce70e7863416e12ad2fe9aa4292609f2ca659 100644 (file)
@@ -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;