eal/windows: fix linkage with MinGW
authorNick Connolly <nick.connolly@mayadata.io>
Sun, 22 Nov 2020 08:45:15 +0000 (08:45 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 22 Nov 2020 17:55:01 +0000 (18:55 +0100)
Linking with the 'pci' driver when building with MinGW on
Windows fails with undefined symbol 'GUID_DEVCLASS_NET'.
This occurs because devguid.h is included in rte_windows.h
before INITGUID is defined.

Move the include of devguid.h after the definition of INITGUID.

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-by: Tal Shnaiderman <talshn@nvidia.com>
lib/librte_eal/windows/include/rte_windows.h

index 0a5e71a..b82af34 100644 (file)
 #include <psapi.h>
 #include <setupapi.h>
 #include <winioctl.h>
-#include <devguid.h>
 
 /* Have GUIDs defined. */
 #ifndef INITGUID
 #define INITGUID
 #endif
 #include <initguid.h>
+#include <devguid.h>
 #include <rte_log.h>
 
 /**