From patchwork Sun Apr 18 17:08:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tal Shnaiderman X-Patchwork-Id: 91720 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB84EA0547; Sun, 18 Apr 2021 19:09:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BB76410E5; Sun, 18 Apr 2021 19:09:45 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id EF730410D7 for ; Sun, 18 Apr 2021 19:09:43 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from talshn@nvidia.com) with SMTP; 18 Apr 2021 20:09:39 +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 13IH9cpK021213; Sun, 18 Apr 2021 20:09:38 +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: Sun, 18 Apr 2021 20:08:03 +0300 Message-Id: <20210418170803.15684-1-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 Subject: [dpdk-dev] [PATCH] 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 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 --- 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)