[v3] eal/windows: fix link error with MinGW

Message ID 20201122084515.26348-1-nick.connolly@mayadata.io (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v3] eal/windows: fix link error with MinGW |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing warning Testing issues
ci/travis-robot success Travis build: passed

Commit Message

Nick Connolly Nov. 22, 2020, 8:45 a.m. UTC
  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>
---
v2
* Change Cc to stable@dpdk.org
v2
* Fix commit message - add blank line, use present tense

 lib/librte_eal/windows/include/rte_windows.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tal Shnaiderman Nov. 22, 2020, 9 a.m. UTC | #1
> Subject: [PATCH v3] eal/windows: fix link error with MinGW
> 
> 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>
> ---
> v2
> * Change Cc to stable@dpdk.org
> v2
> * Fix commit message - add blank line, use present tense
> 
>  lib/librte_eal/windows/include/rte_windows.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/windows/include/rte_windows.h
> b/lib/librte_eal/windows/include/rte_windows.h
> index 0a5e71a05..b82af34f6 100644
> --- a/lib/librte_eal/windows/include/rte_windows.h
> +++ b/lib/librte_eal/windows/include/rte_windows.h
> @@ -25,13 +25,13 @@
>  #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>
> 
>  /**
> --
> 2.25.1

Reviewed-by: Tal Shnaiderman <talshn@nvidia.com>
  
Thomas Monjalon Nov. 22, 2020, 5:57 p.m. UTC | #2
> > 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>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
index 0a5e71a05..b82af34f6 100644
--- a/lib/librte_eal/windows/include/rte_windows.h
+++ b/lib/librte_eal/windows/include/rte_windows.h
@@ -25,13 +25,13 @@ 
 #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>
 
 /**