app/test-fib: enable test-fib on Windows
PATCH 1/1 app/test-fib: enable test-fib on Windows
Removed a few includes which were not needed and included rte_os_shim.h to handle strtok_r which does not exist on Windows with that exact name.
Signed-off-by Andre Muezerie <[email protected]>
--- app/test-fib/main.c | 8 ++++++-- app/test-fib/meson.build | 6 ------ 2 files changed, 6 insertions(+), 8 deletions(-)
app/test-fib/main.c +6 -2
@@ -5,8 +5,6 @@#include <getopt.h> #include <stdlib.h> #include <string.h> -#include <arpa/inet.h> -#include <sys/socket.h> #include <rte_cycles.h> #include <rte_errno.h>
@@ -15,9 +13,15 @@#include <rte_malloc.h> #include <rte_lpm.h> #include <rte_lpm6.h> +#include <rte_os_shim.h> #include <rte_fib.h> #include <rte_fib6.h> +#ifndef LINE_MAX +/* On Linux this constant is defined in limits.h, but not on Windows */ +#define LINE_MAX 2048 +#endif +#define PRINT_USAGE_START "%s [EAL options] --\n"#define GET_CB_FIELD (in, fd, base, lim, dlm) do { \
app/test-fib/meson.build +0 -6
@@ -1,11 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files('main.c') deps += ['fib', 'lpm', 'net']
Signature · 1 line
2.47.0.vfs.0.3
Quoted 55 lines · Andre Muezerie
Removed a few includes which were not needed and included
rte_os_shim.hto handlestrtok_rwhich does not exist on Windows with that exact name.Signed-off-by Andre Muezerie <[email protected]>--- app/test-fib/main.c | 8 ++++++-- app/test-fib/meson.build | 6 ------ 2 files changed, 6 insertions(+), 8 deletions(-)app/test-fib/main.c +6
-2@@ -5,8 +5,6 @@#include <getopt.h> #include <stdlib.h> #include <string.h> -#include <arpa/inet.h> -#include <sys/socket.h> #include <rte_cycles.h> #include <rte_errno.h> @@ -15,9 +13,15 @@#include <rte_malloc.h> #include <rte_lpm.h> #include <rte_lpm6.h> +#include <rte_os_shim.h> #include <rte_fib.h> #include <rte_fib6.h> +#ifndef LINE_MAX +/* On Linux this constant is defined in limits.h, but not on Windows */ +#define LINE_MAX 2048 +#endif +#define PRINT_USAGE_START "%s [EAL options] --\n"#define GET_CB_FIELD (in, fd, base, lim, dlm) do { \app/test-fib/meson.build +0
-6@@ -1,11 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files('main.c') deps += ['fib', 'lpm', 'net']
Signature · 2 lines
Regards, Vladimir
David Marchand
AppliedQuoted 6 lines · Andre Muezerie
Removed a few includes which were not needed and included
rte_os_shim.hto handlestrtok_rwhich does not exist on Windows with that exact name.Signed-off-by Andre Muezerie <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand