st_size is an off32_t or off64_t, so %ld does not always work. Cc: Anthony Liguori <aligu...@us.ibm.com> Cc: Cam Macdonell <c...@cs.ualberta.ca> Signed-off-by: Stefan Weil <w...@mail.berlios.de> --- hw/ivshmem.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bbb5cba..ec894e9 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -352,8 +352,8 @@ 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 ")\n", + s->ivshmem_size, (uint64_t)buf.st_size); return -1; } else { return 0; -- 1.7.1