[dpdk-dev,v5,04/11] virtio_pci.h: build fix for sys/io.h for non-x86 arch

Message ID 1453203972-24855-5-git-send-email-sshukla@mvista.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Santosh Shukla Jan. 19, 2016, 11:46 a.m. UTC
  make sure sys/io.h used only for x86 archs. This fixes build error
arm64/arm case.

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
 drivers/net/virtio/virtio_pci.h |    2 ++
 1 file changed, 2 insertions(+)
  

Comments

Santosh Shukla Jan. 27, 2016, 2:25 a.m. UTC | #1
Ping
On Jan 19, 2016 5:16 PM, "Santosh Shukla" <sshukla@mvista.com> wrote:

> make sure sys/io.h used only for x86 archs. This fixes build error
> arm64/arm case.
>
> Signed-off-by: Santosh Shukla <sshukla@mvista.com>
> ---
>  drivers/net/virtio/virtio_pci.h |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_pci.h
> b/drivers/net/virtio/virtio_pci.h
> index 99572a0..f550d22 100644
> --- a/drivers/net/virtio/virtio_pci.h
> +++ b/drivers/net/virtio/virtio_pci.h
> @@ -40,8 +40,10 @@
>  #include <sys/types.h>
>  #include <machine/cpufunc.h>
>  #else
> +#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686)
>  #include <sys/io.h>
>  #endif
> +#endif
>
>  #include <rte_ethdev.h>
>
> --
> 1.7.9.5
>
>
  

Patch

diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 99572a0..f550d22 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -40,8 +40,10 @@ 
 #include <sys/types.h>
 #include <machine/cpufunc.h>
 #else
+#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686)
 #include <sys/io.h>
 #endif
+#endif
 
 #include <rte_ethdev.h>