qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7
@ 2015-06-17 12:35 Leon Alrae
  2015-06-17 12:47 ` Eric Auger
  2015-06-17 14:47 ` Alex Williamson
  0 siblings, 2 replies; 4+ messages in thread
From: Leon Alrae @ 2015-06-17 12:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, alex.williamson, eric.auger

Include linux/vfio.h after sys/ioctl.h, just like in hw/vfio/common.c.

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
---
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 <linux/vfio.h>
 #include <sys/ioctl.h>
+#include <linux/vfio.h>
 
 #include "hw/vfio/vfio-platform.h"
 #include "qemu/error-report.h"

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7
  2015-06-17 12:35 [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7 Leon Alrae
@ 2015-06-17 12:47 ` Eric Auger
  2015-06-17 14:47 ` Alex Williamson
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Auger @ 2015-06-17 12:47 UTC (permalink / raw)
  To: Leon Alrae, qemu-devel; +Cc: peter.maydell, alex.williamson

Hi Leon,
On 06/17/2015 02:35 PM, Leon Alrae wrote:
> Include linux/vfio.h after sys/ioctl.h, just like in hw/vfio/common.c.
> 
> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
> ---
> 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.
Sorry for the inconvenience and thanks for the correction.

Best Regards

Eric
> 
> 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 <linux/vfio.h>
>  #include <sys/ioctl.h>
> +#include <linux/vfio.h>
>  
>  #include "hw/vfio/vfio-platform.h"
>  #include "qemu/error-report.h"
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7
  2015-06-17 12:35 [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7 Leon Alrae
  2015-06-17 12:47 ` Eric Auger
@ 2015-06-17 14:47 ` Alex Williamson
  2015-06-18 10:23   ` Peter Maydell
  1 sibling, 1 reply; 4+ messages in thread
From: Alex Williamson @ 2015-06-17 14:47 UTC (permalink / raw)
  To: Leon Alrae; +Cc: peter.maydell, qemu-devel, eric.auger

On Wed, 2015-06-17 at 13:35 +0100, Leon Alrae wrote:
> Include linux/vfio.h after sys/ioctl.h, just like in hw/vfio/common.c.
> 
> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
> ---
> 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 <linux/vfio.h>
>  #include <sys/ioctl.h>
> +#include <linux/vfio.h>
>  
>  #include "hw/vfio/vfio-platform.h"
>  #include "qemu/error-report.h"

Thanks for the patch.  Peter, if you want to pop this in as a build fix,
I'd welcome it.  Otherwise I can take it the normal route.  Thanks.

Acked-by: Alex Williamson <alex.williamson@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7
  2015-06-17 14:47 ` Alex Williamson
@ 2015-06-18 10:23   ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-06-18 10:23 UTC (permalink / raw)
  To: Alex Williamson; +Cc: Leon Alrae, QEMU Developers, Eric Auger

On 17 June 2015 at 15:47, Alex Williamson <alex.williamson@redhat.com> wrote:
> On Wed, 2015-06-17 at 13:35 +0100, Leon Alrae wrote:
>> Include linux/vfio.h after sys/ioctl.h, just like in hw/vfio/common.c.
>>
>> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>

>
> Thanks for the patch.  Peter, if you want to pop this in as a build fix,
> I'd welcome it.  Otherwise I can take it the normal route.  Thanks.
>
> Acked-by: Alex Williamson <alex.williamson@redhat.com>

Thanks, applied to master as a build fix.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-18 10:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17 12:35 [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7 Leon Alrae
2015-06-17 12:47 ` Eric Auger
2015-06-17 14:47 ` Alex Williamson
2015-06-18 10:23   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).