From patchwork Thu Apr 1 21:56:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 49248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7182EB7D12 for ; Fri, 2 Apr 2010 08:58:08 +1100 (EST) Received: from localhost ([127.0.0.1]:51965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxSOr-0004RI-5U for incoming@patchwork.ozlabs.org; Thu, 01 Apr 2010 17:58:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxSNR-00040B-W8 for qemu-devel@nongnu.org; Thu, 01 Apr 2010 17:56:38 -0400 Received: from [140.186.70.92] (port=59123 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxSNQ-0003zM-Ob for qemu-devel@nongnu.org; Thu, 01 Apr 2010 17:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxSNN-0003jA-37 for qemu-devel@nongnu.org; Thu, 01 Apr 2010 17:56:36 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:60299) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxSNM-0003is-Hy for qemu-devel@nongnu.org; Thu, 01 Apr 2010 17:56:33 -0400 Received: from flocke.weilnetz.de (p54ADFAC7.dip.t-dialin.net [84.173.250.199]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LzneB-1NT9jB1Ji7-014Np5; Thu, 01 Apr 2010 23:56:30 +0200 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1NxSNJ-0003Q7-6z; Thu, 01 Apr 2010 23:56:29 +0200 From: Stefan Weil To: QEMU Developers Date: Thu, 1 Apr 2010 23:56:25 +0200 Message-Id: <1270158985-13119-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.0 MIME-Version: 1.0 X-Provags-ID: V01U2FsdGVkX188RL1lvHabGnrRBqmKr0W8n96xilyGZkQBKaG rWyo321axobDGYdB7mg98UNg+hNkUeCCw2sMfkULSequ80RdzS KyQxcVx6KWruUks36e9gUFX40qVc9wBJtXSp2wlr3CebLDujlg VRQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Anthony Liguori , "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH] win32: Fix compiler errors from u_int64_t X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Cc: Anthony Liguori Signed-off-by: Stefan Weil Acked-by: Michael S. Tsirkin --- 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)