From: Alexander Graf <agraf@suse.de>
To: qemu-devel List <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 1/4] Fix compile of ivshmem on 32 bit hosts
Date: Fri, 3 Sep 2010 01:16:35 +0200 [thread overview]
Message-ID: <1283469398-19965-2-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1283469398-19965-1-git-send-email-agraf@suse.de>
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(-)
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
next prev parent reply other threads:[~2010-09-02 23:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 23:16 [Qemu-devel] [PULL 0/4] PPC updates Alexander Graf
2010-09-02 23:16 ` Alexander Graf [this message]
2010-09-02 23:16 ` [Qemu-devel] [PATCH 2/4] KVM: PPC: Add level based interrupt logic Alexander Graf
2010-09-02 23:16 ` [Qemu-devel] [PATCH 3/4] PPC: Qdev'ify e500 pci Alexander Graf
2010-09-02 23:16 ` [Qemu-devel] [PATCH 4/4] PPC: Make e500 pci byte swap config data Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1283469398-19965-2-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).