From 826476bc70ccb9ac4c47677d8d0685e0edac6f13 Mon Sep 17 00:00:00 2001 From: Tal Shnaiderman Date: Mon, 13 Sep 2021 19:55:00 +0300 Subject: [PATCH] eal/windows: fix debug build When building DPDK on Windows in debug mode the following warning appear: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments] #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__) Modify the 'open' macro to avoid it. Fixes: 45d62067c237 ("eal: make OS shims internal") Cc: stable@dpdk.org Signed-off-by: Tal Shnaiderman Acked-by: Dmitry Kozlyuk --- lib/eal/windows/include/rte_os_shim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h index 33619745ab..eda8113662 100644 --- a/lib/eal/windows/include/rte_os_shim.h +++ b/lib/eal/windows/include/rte_os_shim.h @@ -25,7 +25,7 @@ #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count) #endif -#define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__) +#define open(...) _open(__VA_ARGS__) #define read(fd, buf, n) _read(fd, buf, n) #define write(fd, buf, n) _write(fd, buf, n) #define close(fd) _close(fd) -- 2.20.1