From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 33D93A0547; Wed, 21 Apr 2021 18:09:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C09D41B72; Wed, 21 Apr 2021 18:09:56 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 77D1841AC8 for ; Wed, 21 Apr 2021 18:09:54 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from talshn@nvidia.com) with SMTP; 21 Apr 2021 19:09:53 +0300 Received: from nvidia.com (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 13LG9rDf031544; Wed, 21 Apr 2021 19:09:53 +0300 From: Tal Shnaiderman To: dev@dpdk.org Cc: thomas@monjalon.net, pallavi.kadam@intel.com, dmitry.kozliuk@gmail.com, navasile@linux.microsoft.com, dmitrym@microsoft.com Date: Wed, 21 Apr 2021 19:09:42 +0300 Message-Id: <20210421160942.17700-1-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20210418170803.15684-1-talshn@nvidia.com> References: <20210418170803.15684-1-talshn@nvidia.com> Subject: [dpdk-dev] [PATCH v2] eal/windows: fix build warnings in MinGW X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" the strncasecmp macro 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 in debug mode. ..\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 macro only to the clang compiler. Fixes: 45d62067c237 ("eal: make OS shims internal") Signed-off-by: Tal Shnaiderman --- v2: fix commit message typo [Thomas] --- 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