From patchwork Wed Jun 17 12:35:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leon Alrae X-Patchwork-Id: 485378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7E97414027C for ; Wed, 17 Jun 2015 22:36:36 +1000 (AEST) Received: from localhost ([::1]:46485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5Ca2-00025Y-FY for incoming@patchwork.ozlabs.org; Wed, 17 Jun 2015 08:36:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5CYx-00010M-9F for qemu-devel@nongnu.org; Wed, 17 Jun 2015 08:35:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5CYs-0002E0-9a for qemu-devel@nongnu.org; Wed, 17 Jun 2015 08:35:27 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:47207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5CYs-0002Dd-4s for qemu-devel@nongnu.org; Wed, 17 Jun 2015 08:35:22 -0400 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id D5BCCC0426229; Wed, 17 Jun 2015 13:35:18 +0100 (IST) Received: from lalrae-linux.kl.imgtec.org (192.168.14.163) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 17 Jun 2015 13:35:20 +0100 From: Leon Alrae To: Date: Wed, 17 Jun 2015 13:35:00 +0100 Message-ID: <1434544500-22405-1-git-send-email-leon.alrae@imgtec.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Originating-IP: [192.168.14.163] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Cc: peter.maydell@linaro.org, alex.williamson@redhat.com, eric.auger@linaro.org Subject: [Qemu-devel] =?utf-8?q?=5BPATCH=5D_vfio=3A_fix_build_error_on_Cen?= =?utf-8?q?tOS_5=2E7?= X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Include linux/vfio.h after sys/ioctl.h, just like in hw/vfio/common.c. Signed-off-by: Leon Alrae Acked-by: Alex Williamson --- CentOS 5 is one of hosts I still use. For building I already provide custom GLib to satisfy version 2.22 dependency. However, with commit 0ea2730b QEMU doesn't build on CentOS 5.7: CC mips-softmmu/hw/vfio/platform.o In file included from /usr/include/stdlib.h:438, from /work/qemu/include/qemu-common.h:26, from /work/qemu/include/hw/hw.h:5, from /work/qemu/include/hw/qdev.h:4, from /work/qemu/include/hw/sysbus.h:6, from /work/qemu/include/hw/vfio/vfio-platform.h:19, from /work/qemu/hw/vfio/platform.c:20: /usr/include/sys/types.h:46: error: conflicting types for ‘loff_t’ /usr/include/linux/types.h:30: error: previous declaration of ‘loff_t’ was here /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’ /usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here ... And this patch fixes above problem. Leon --- hw/vfio/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 9382bb7..5c678b9 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -14,8 +14,8 @@ * Copyright Red Hat, Inc. 2012 */ -#include #include +#include #include "hw/vfio/vfio-platform.h" #include "qemu/error-report.h"