eal: fix Windows build

Message ID 20200421150520.18840-1-talshn@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series eal: fix Windows build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Tal Shnaiderman April 21, 2020, 3:05 p.m. UTC
  From: Tal Shnaiderman <talshn@mellanox.com>

Windows headers pthread.h and fnmatch.h
uses rte_common types

The error is: error: unknown type name '__rte_unused'

The fix adds the missing includes.

Bugzilla ID: 458
Fixes: f2fc83b40f06 ("replace unused attributes")

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
Depends-on: patch-68444
(eal/windows: do not expose private EAL facilities)
---
 lib/librte_eal/windows/include/fnmatch.h | 2 ++
 lib/librte_eal/windows/include/pthread.h | 1 +
 2 files changed, 3 insertions(+)
  

Comments

Thomas Monjalon April 21, 2020, 10:47 p.m. UTC | #1
21/04/2020 17:05, talshn@mellanox.com:
> From: Tal Shnaiderman <talshn@mellanox.com>
> 
> Windows headers pthread.h and fnmatch.h
> uses rte_common types
> 
> The error is: error: unknown type name '__rte_unused'
> 
> The fix adds the missing includes.
> 
> Bugzilla ID: 458
> Fixes: f2fc83b40f06 ("replace unused attributes")
> 
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
> Depends-on: patch-68444
> (eal/windows: do not expose private EAL facilities)

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/windows/include/fnmatch.h b/lib/librte_eal/windows/include/fnmatch.h
index 41b574312..d0159f07a 100644
--- a/lib/librte_eal/windows/include/fnmatch.h
+++ b/lib/librte_eal/windows/include/fnmatch.h
@@ -14,6 +14,8 @@ 
 extern "C" {
 #endif
 
+#include <rte_common.h>
+
 #define FNM_NOMATCH 1
 
 /**
diff --git a/lib/librte_eal/windows/include/pthread.h b/lib/librte_eal/windows/include/pthread.h
index 7c0caaf07..0bbed5c3b 100644
--- a/lib/librte_eal/windows/include/pthread.h
+++ b/lib/librte_eal/windows/include/pthread.h
@@ -17,6 +17,7 @@  extern "C" {
 #endif
 
 #include <windows.h>
+#include <rte_common.h>
 
 #define PTHREAD_BARRIER_SERIAL_THREAD TRUE