From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OsJpU-0002O2-22 for qemu-devel@nongnu.org; Sun, 05 Sep 2010 14:20:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OsJpS-0000td-MD for qemu-devel@nongnu.org; Sun, 05 Sep 2010 14:20:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12210) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OsJpS-0000tU-Eh for qemu-devel@nongnu.org; Sun, 05 Sep 2010 14:20:34 -0400 Date: Sun, 5 Sep 2010 21:14:36 +0300 From: "Michael S. Tsirkin" Message-ID: <20100905181435.GA24728@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] ivshmem: fix build on a 32 bit system List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: cam@cs.ualberta.ca, qemu-devel@nongnu.org, Anthony Liguori /scm/qemu/hw/ivshmem.c: In function =E2=80=98check_shm_size=E2=80=99: /scm/qemu/hw/ivshmem.c:356: error: format =E2=80=98%ld=E2=80=99 expects t= ype =E2=80=98long int=E2=80=99, but argument 4 has type =E2=80=98__off64_t=E2=80=99 Fix by casting to u64. Signed-off-by: Michael S. Tsirkin --- hw/ivshmem.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bbb5cba..6f41383 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -352,8 +352,9 @@ static int check_shm_size(IVShmemState *s, int fd) { =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, " than shared object size " + "(%" PRIu64 " > %" PRIu64 "d)\n", + s->ivshmem_size, (uint64_t)buf.st_size); return -1; } else { return 0; --=20 1.7.2.rc0.14.g41c1c