From: Tyler Retzlaff Date: Thu, 14 Jan 2021 21:22:35 +0000 (-0800) Subject: bus/pci: fix build with Windows SDK >= 10.0.20253 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6605c7f02e2410e932019ee554c21287c727d34f;p=dpdk.git bus/pci: fix build with Windows SDK >= 10.0.20253 NetUIO device class and interface GUIDs are defined in system headers starting from platform SDK v10.0.20253. Inspect SDK version to avoid redefinition. Pre-release SDKs do not promise compatibility and a narrow subset of SDKs may still be subject to redefinition. Fixes: c76ec01b4591 (bus/pci: support netuio on Windows) Cc: stable@dpdk.org Signed-off-by: Tyler Retzlaff Acked-by: Dmitry Kozlyuk Acked-by: Ranjit Menon --- diff --git a/drivers/bus/pci/windows/pci_netuio.c b/drivers/bus/pci/windows/pci_netuio.c index 6701948392..1bf9133f71 100644 --- a/drivers/bus/pci/windows/pci_netuio.c +++ b/drivers/bus/pci/windows/pci_netuio.c @@ -7,6 +7,12 @@ #include #include +#ifdef __MINGW32__ +#include +#else +#include +#endif + #include "private.h" #include "pci_netuio.h" diff --git a/drivers/bus/pci/windows/pci_netuio.h b/drivers/bus/pci/windows/pci_netuio.h index 9a77806b57..2f6c97ea73 100644 --- a/drivers/bus/pci/windows/pci_netuio.h +++ b/drivers/bus/pci/windows/pci_netuio.h @@ -5,6 +5,7 @@ #ifndef _PCI_NETUIO_H_ #define _PCI_NETUIO_H_ +#if !defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE /* GUID definition for device class netUIO */ DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28, 0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f); @@ -12,6 +13,7 @@ DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28, /* GUID definition for the netuio device interface */ DEFINE_GUID(GUID_DEVINTERFACE_NETUIO, 0x08336f60, 0x0679, 0x4c6c, 0x85, 0xd2, 0xae, 0x7c, 0xed, 0x65, 0xff, 0xf7); +#endif /* IOCTL code definitions */ #define IOCTL_NETUIO_MAP_HW_INTO_USERSPACE \