Skip to content
Snippets Groups Projects
Commit 0131c8c2 authored by Avi Kivity's avatar Avi Kivity Committed by Anthony Liguori
Browse files

Fix ivshmem build on 32-bit hosts


stat() fields can be more or less anything depending on configuration, cast
explicitly to uint64_t to avoid printf() format mismatches.

Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
(cherry picked from commit ad0a4ac1)
parent d3c5b2e6
Branches
Tags
No related merge requests found
......@@ -351,9 +351,10 @@ 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment