The compile of ivshmem.c on my ppc system breaks with the following error: ivshmem.c: In function ‘check_shm_size’: ivshmem.c:356: error: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘__off64_t’
This patch adds an explicit cast, making printf happy. Signed-off-by: Alexander Graf <ag...@suse.de> --- hw/ivshmem.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bbb5cba..0c9cc84 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -351,9 +351,9 @@ 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; -- 1.6.0.2