Received: from [140.186.70.92] (port=49548 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrJ1P-0006pm-Db for qemu-devel@nongnu.org; Thu, 02 Sep 2010 19:16:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrJ1M-0008Ed-UB for qemu-devel@nongnu.org; Thu, 02 Sep 2010 19:16:42 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47906 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrJ1M-0008E8-O4 for qemu-devel@nongnu.org; Thu, 02 Sep 2010 19:16:40 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 9B88E8A908 for ; Fri, 3 Sep 2010 01:16:38 +0200 (CEST) From: Alexander Graf Date: Fri, 3 Sep 2010 01:16:35 +0200 Message-Id: <1283469398-19965-2-git-send-email-agraf@suse.de> In-Reply-To: <1283469398-19965-1-git-send-email-agraf@suse.de> References: <1283469398-19965-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 1/4] Fix compile of ivshmem on 32 bit hosts List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel List The compile of ivshmem.c on my ppc system breaks with the following error= : ivshmem.c: In function =E2=80=98check_shm_size=E2=80=99: ivshmem.c:356: error: format =E2=80=98%ld=E2=80=99 expects type =E2=80=98= long int=E2=80=99, but argument 4 has type =E2=80=98__off64_t=E2=80=99 This patch adds an explicit cast, making printf happy. Signed-off-by: Alexander Graf --- 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); =20 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 th= an " + "shared object size (%" PRIu64 " > %" PRIu64 ")\= n", + s->ivshmem_size, (uint64_t)buf.st_= size); return -1; } else { return 0; --=20 1.6.0.2