DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal/windows: fix build warnings in MinGW
@ 2021-04-18 17:08 Tal Shnaiderman
  2021-04-18 18:13 ` Thomas Monjalon
  2021-04-21 16:09 ` [dpdk-dev] [PATCH v2] " Tal Shnaiderman
  0 siblings, 2 replies; 16+ messages in thread
From: Tal Shnaiderman @ 2021-04-18 17:08 UTC (permalink / raw)
  To: dev; +Cc: thomas, pallavi.kadam, dmitry.kozliuk, navasile, dmitrym

the strncasecmp marco defined in rte_os_shim.h is already
defined in MinGW-w64, as a result the compiler prints out
the warning below on function redefinition whenever compiling
a file including the header.

..\lib/librte_eal/windows/include/rte_os_shim.h:21:
warning: "strncasecmp" redefined
#define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)

Fixed by defining the marco only to the clang compiler.

Fixes: 45d62067c237 ("eal: make OS shims internal")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/librte_eal/windows/include/rte_os_shim.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/windows/include/rte_os_shim.h b/lib/librte_eal/windows/include/rte_os_shim.h
index f40fb62d1d..db0ea6f1b3 100644
--- a/lib/librte_eal/windows/include/rte_os_shim.h
+++ b/lib/librte_eal/windows/include/rte_os_shim.h
@@ -17,7 +17,9 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#ifndef RTE_TOOLCHAIN_GCC
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
+#endif
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
 #define read(fd, buf, n) _read(fd, buf, n)
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-05-04 17:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 17:08 [dpdk-dev] [PATCH] eal/windows: fix build warnings in MinGW Tal Shnaiderman
2021-04-18 18:13 ` Thomas Monjalon
2021-04-18 19:04   ` Tal Shnaiderman
2021-04-18 20:23     ` Dmitry Kozlyuk
2021-04-19  6:57       ` Tal Shnaiderman
2021-04-19 18:06         ` Tal Shnaiderman
2021-04-19 18:15           ` Thomas Monjalon
2021-04-19 19:29             ` [dpdk-dev] [dpdk-ci] " Aaron Conole
2021-04-19 20:09               ` Dmitry Kozlyuk
2021-04-19 20:33                 ` Lincoln Lavoie
2021-04-20 11:01                 ` Tal Shnaiderman
2021-04-19 19:45           ` [dpdk-dev] " Dmitry Kozlyuk
2021-04-19 18:55         ` Dmitry Kozlyuk
2021-04-21 16:09 ` [dpdk-dev] [PATCH v2] " Tal Shnaiderman
2021-04-26 15:58   ` Dmitry Kozlyuk
2021-05-04 17:17     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).