qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] win32: Fix compiler errors from u_int64_t


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] win32: Fix compiler errors from u_int64_t
Date: Thu, 01 Apr 2010 17:00:51 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 04/01/2010 04:56 PM, Stefan Weil wrote:
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.

Curious.  What platform/gcc are you on?

Applied.  Thanks.

Regards,

Anthony Liguori

Cc: Michael S. Tsirkin<address@hidden>
Cc: Anthony Liguori<address@hidden>
Signed-off-by: Stefan Weil<address@hidden>
---
  hw/vhost.c  |    6 +++---
  hw/virtio.c |    2 +-
  2 files changed, 4 insertions(+), 4 deletions(-)

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_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,
      };
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(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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]