win32: Fix compiler errors from u_int64_t

u_int64_t raises compiler error messages:

  CC    libhw32/virtio.o
/qemu/ar7/hw/virtio.c: In function ‘virtio_queue_get_avail_size’:
/qemu/ar7/hw/virtio.c:776: error: ‘u_int64_t’ undeclared (first use in this function)
/qemu/ar7/hw/virtio.c:776: error: (Each undeclared identifier is reported only once
/qemu/ar7/hw/virtio.c:776: error: for each function it appears in.)

Replacing u_int64_t by uint64_t helps.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Stefan Weil 2010-04-01 16:59:51 -05:00 committed by Anthony Liguori
parent a18f844fb5
commit 2b3af99984
2 changed files with 4 additions and 4 deletions

View File

@ -357,9 +357,9 @@ static int vhost_virtqueue_set_addr(struct vhost_dev *dev,
{
struct vhost_vring_addr addr = {
.index = idx,
.desc_user_addr = (u_int64_t)(unsigned long)vq->desc,
.avail_user_addr = (u_int64_t)(unsigned long)vq->avail,
.used_user_addr = (u_int64_t)(unsigned long)vq->used,
.desc_user_addr = (uint64_t)(unsigned long)vq->desc,
.avail_user_addr = (uint64_t)(unsigned long)vq->avail,
.used_user_addr = (uint64_t)(unsigned long)vq->used,
.log_guest_addr = vq->used_phys,
.flags = enable_log ? (1 << VHOST_VRING_F_LOG) : 0,
};

View File

@ -773,7 +773,7 @@ target_phys_addr_t virtio_queue_get_desc_size(VirtIODevice *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;
}
target_phys_addr_t virtio_queue_get_used_size(VirtIODevice *vdev, int n)