[v3,3/7] pci: build on Windows
Checks
Commit Message
From: Tal Shnaiderman <talshn@mellanox.com>
Added off_t in Windows header file as a supported
type since it is needed by PCI.
Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
lib/librte_eal/windows/include/rte_os.h | 1 +
lib/meson.build | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
Comments
On 2020-05-07 15:16 GMT+0300 talshn@mellanox.com wrote:
> From: Tal Shnaiderman <talshn@mellanox.com>
>
> Added off_t in Windows header file as a supported
> type since it is needed by PCI.
>
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
> lib/librte_eal/windows/include/rte_os.h | 1 +
> lib/meson.build | 5 ++++-
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
> index 62805a307..1c433b976 100644
> --- a/lib/librte_eal/windows/include/rte_os.h
> +++ b/lib/librte_eal/windows/include/rte_os.h
> @@ -48,6 +48,7 @@ extern "C" {
>
> /* as in <windows.h> */
> typedef long long ssize_t;
> +typedef long off_t;
Windows actually has off_t in <sys/types.h>, where it is by POSIX. Shouldn't
rte_pci.h include <sys/types.h> instead? IMO, shims should be kept at minimum.
@@ -48,6 +48,7 @@ extern "C" {
/* as in <windows.h> */
typedef long long ssize_t;
+typedef long off_t;
#ifndef RTE_TOOLCHAIN_GCC
static inline int
@@ -35,7 +35,10 @@ libraries = [
'flow_classify', 'bpf', 'graph', 'node', 'telemetry']
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