[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] ivshmem: fix build on a 32 bit system
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH] ivshmem: fix build on a 32 bit system |
Date: |
Sun, 5 Sep 2010 21:14:36 +0300 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
/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 <address@hidden>
---
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] ivshmem: fix build on a 32 bit system,
Michael S. Tsirkin <=