Comments
Patch
@@ -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;
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 <agraf@suse.de> --- hw/ivshmem.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)