提交 ad0a4ac1 编写于 作者: A Avi Kivity 提交者: Blue Swirl

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: NAvi Kivity <avi@redhat.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 c93031e5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册