From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NyLkD-00022U-Oh for qemu-devel@nongnu.org; Sun, 04 Apr 2010 05:03:50 -0400 Received: from [140.186.70.92] (port=36390 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NyLkB-00020j-4k for qemu-devel@nongnu.org; Sun, 04 Apr 2010 05:03:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NyLk8-0001dk-Uw for qemu-devel@nongnu.org; Sun, 04 Apr 2010 05:03:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5798) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NyLk8-0001dX-NQ for qemu-devel@nongnu.org; Sun, 04 Apr 2010 05:03:44 -0400 Date: Sun, 4 Apr 2010 11:59:51 +0300 From: "Michael S. Tsirkin" Message-ID: <20100404085951.GB3189@redhat.com> References: <1270158985-13119-1-git-send-email-weil@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1270158985-13119-1-git-send-email-weil@mail.berlios.de> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH] win32: Fix compiler errors from u_int64_t List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Anthony Liguori , QEMU Developers On Thu, Apr 01, 2010 at 11:56:25PM +0200, Stefan Weil wrote: > u_int64_t raises compiler error messages: >=20 > CC libhw32/virtio.o > /qemu/ar7/hw/virtio.c: In function =E2=80=98virtio_queue_get_avail_size= =E2=80=99: > /qemu/ar7/hw/virtio.c:776: error: =E2=80=98u_int64_t=E2=80=99 undeclare= d (first use in this function) > /qemu/ar7/hw/virtio.c:776: error: (Each undeclared identifier is report= ed only once > /qemu/ar7/hw/virtio.c:776: error: for each function it appears in.) >=20 > Replacing u_int64_t by uint64_t helps. >=20 > Cc: Michael S. Tsirkin > Cc: Anthony Liguori > Signed-off-by: Stefan Weil Acked-by: Michael S. Tsirkin Speaking of which, we have: /scm/qemu/slirp/slirp.h:typedef uint64_t u_int64_t; which we probably don't need either? > --- > hw/vhost.c | 6 +++--- > hw/virtio.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/hw/vhost.c b/hw/vhost.c > index 1e5bc69..ad2f98a 100644 > --- a/hw/vhost.c > +++ b/hw/vhost.c > @@ -357,9 +357,9 @@ static int vhost_virtqueue_set_addr(struct vhost_de= v *dev, > { > struct vhost_vring_addr addr =3D { > .index =3D idx, > - .desc_user_addr =3D (u_int64_t)(unsigned long)vq->desc, > - .avail_user_addr =3D (u_int64_t)(unsigned long)vq->avail, > - .used_user_addr =3D (u_int64_t)(unsigned long)vq->used, > + .desc_user_addr =3D (uint64_t)(unsigned long)vq->desc, > + .avail_user_addr =3D (uint64_t)(unsigned long)vq->avail, > + .used_user_addr =3D (uint64_t)(unsigned long)vq->used, > .log_guest_addr =3D vq->used_phys, > .flags =3D enable_log ? (1 << VHOST_VRING_F_LOG) : 0, > }; > diff --git a/hw/virtio.c b/hw/virtio.c > index f54129f..e7657ae 100644 > --- a/hw/virtio.c > +++ b/hw/virtio.c > @@ -773,7 +773,7 @@ target_phys_addr_t virtio_queue_get_desc_size(VirtI= ODevice *vdev, int n) > target_phys_addr_t virtio_queue_get_avail_size(VirtIODevice *vdev, int= n) > { > return offsetof(VRingAvail, ring) + > - sizeof(u_int64_t) * vdev->vq[n].vring.num; > + sizeof(uint64_t) * vdev->vq[n].vring.num; > } > =20 > target_phys_addr_t virtio_queue_get_used_size(VirtIODevice *vdev, int = n) > --=20 > 1.7.0