ivshmem: fix build on a 32 bit system
PATCH 1/1 ivshmem: fix build on a 32 bit system
/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 <[email protected]>
--- hw/ivshmem.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
hw/ivshmem.c +3 -2
@@ -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 ;
Signature · 1 line
1.7.2.rc0.14.g41c1c