[v9,04/10] pci: build on Windows

Message ID 20200624082847.21344-5-talshn@mellanox.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Windows bus/pci support |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Tal Shnaiderman June 24, 2020, 8:28 a.m. UTC
  From: Tal Shnaiderman <talshn@mellanox.com>

Added <sys/types.h> in rte_pci header file
to include off_t type since it is missing for Windows.

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
 lib/librte_eal/rte_eal_exports.def | 1 +
 lib/librte_pci/rte_pci.h           | 1 +
 lib/meson.build                    | 5 ++++-
 3 files changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 7f0c8f5376..61bcb8aca7 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -1,5 +1,6 @@ 
 EXPORTS
 	__rte_panic
+	per_lcore__rte_errno
 	rte_calloc
 	rte_calloc_socket
 	rte_eal_get_configuration
diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h
index b721bbf580..9337079178 100644
--- a/lib/librte_pci/rte_pci.h
+++ b/lib/librte_pci/rte_pci.h
@@ -20,6 +20,7 @@  extern "C" {
 #include <limits.h>
 #include <sys/queue.h>
 #include <inttypes.h>
+#include <sys/types.h>
 
 /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
 #define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
diff --git a/lib/meson.build b/lib/meson.build
index d190d84eff..a8fd317a18 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -36,7 +36,10 @@  libraries = [
 	'flow_classify', 'bpf', 'graph', 'node']
 
 if is_windows
-	libraries = ['kvargs','eal'] # only supported libraries for windows
+	libraries = [
+		'kvargs','eal',
+		'pci',
+	] # only supported libraries for windows
 endif
 
 default_cflags = machine_args