From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqiTO-0004wa-Ft for qemu-devel@nongnu.org; Thu, 03 Jan 2013 05:56:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqiTL-0005rL-TB for qemu-devel@nongnu.org; Thu, 03 Jan 2013 05:56:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqiTL-0005rA-Ld for qemu-devel@nongnu.org; Thu, 03 Jan 2013 05:56:27 -0500 From: Stefan Hajnoczi Date: Thu, 3 Jan 2013 11:56:16 +0100 Message-Id: <1357210576-6231-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH] dataplane: use linux-headers/ for virtio includes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Stefan Hajnoczi The hw/dataplane/vring.c code includes linux/virtio_ring.h. Ensure that we use linux-headers/ instead of the system-wide headers, which may be out-of-date on older distros. This resolves the following build error on Debian 6: CC hw/dataplane/vring.o cc1: warnings being treated as errors hw/dataplane/vring.c: In function 'vring_enable_notification': hw/dataplane/vring.c:71: error: implicit declaration of function 'vring_avail_event' hw/dataplane/vring.c:71: error: nested extern declaration of 'vring_avail_event' hw/dataplane/vring.c:71: error: lvalue required as left operand of assignment Note that we now build dataplane/ for each target instead of only once. There is no way around this since linux-headers/ is only available for per-target objects - and it's how virtio, vfio, kvm, and friends are built. Signed-off-by: Stefan Hajnoczi --- hw/Makefile.objs | 3 ++- hw/dataplane/Makefile.objs | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 5ac4913..b8bbed3 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -1,4 +1,4 @@ -common-obj-y = usb/ ide/ pci/ dataplane/ +common-obj-y = usb/ ide/ pci/ common-obj-y += loader.o common-obj-$(CONFIG_VIRTIO) += virtio-console.o common-obj-$(CONFIG_VIRTIO) += virtio-rng.o @@ -191,6 +191,7 @@ common-obj-$(CONFIG_XEN_BACKEND) += xen_console.o xenfb.o xen_disk.o xen_nic.o # Per-target files # virtio has to be here due to weird dependency between PCI and virtio-net. # need to fix this properly +obj-$(CONFIG_VIRTIO) += dataplane/ obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o virtio-scsi.o obj-$(CONFIG_SOFTMMU) += vhost_net.o diff --git a/hw/dataplane/Makefile.objs b/hw/dataplane/Makefile.objs index 682aa9e..3e47d05 100644 --- a/hw/dataplane/Makefile.objs +++ b/hw/dataplane/Makefile.objs @@ -1,3 +1 @@ -ifeq ($(CONFIG_VIRTIO), y) -common-obj-$(CONFIG_VIRTIO_BLK_DATA_PLANE) += hostmem.o vring.o event-poll.o ioq.o virtio-blk.o -endif +obj-$(CONFIG_VIRTIO_BLK_DATA_PLANE) += hostmem.o vring.o event-poll.o ioq.o virtio-blk.o -- 1.8.0.2