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 4FC7AA0524 for ; Fri, 5 Feb 2021 12:19:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48D451606BA; Fri, 5 Feb 2021 12:19:33 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 8C6981606BA for ; Fri, 5 Feb 2021 12:19:32 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id g10so7298762wrx.1 for ; Fri, 05 Feb 2021 03:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7efu75beYoFiCsRyBuVib52xMVa0tSlW0mLd6OW5s5Y=; b=MsmtR9PBJnkGrrgg355Gs8CDPeTiisWEeVjUdXjg61ix+638CXrVzuEDDubC/ajSyK YAkF7LwyOXC1hQ5OcCKKPV/xIFV+tXzXXjnifB6cPNc8Xy9y5tqQfdzSEr6D7VLmJigN mZOnRKhyqa7EjTEx5QygiiW/CoPMCj/JIZ4EUeI3rxLuh7wbZb14pog7lAvDaSznuZpd v5G9UA3wfe52PI5bB8SSTNqDCYv3ho3T1INfTHvKAQ4He4z6YmJhriy+a1sLPTwsbZvb 5HDRaZUheep6SmUmS+L7wpgTblN3D0kEJ33qrTMvpheIqlvRcLtaTcxqd6qW3fCaYUR+ qS4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7efu75beYoFiCsRyBuVib52xMVa0tSlW0mLd6OW5s5Y=; b=fen1tFP5194NWMO5irA5opaJEXttunLiWpPUWERgfhPXfw2O8hwam6fYGSeZOS3BRf 8D7B9MuVTWVgPA6ejlDEt1Trm8qMvPbXuZOo2mtwmBjYp4qyWGFI0KOzKnH4w8w/5/b4 1WIv+8GtnnjS4LYxMvK442SUhFMVuz2D3CQ6kmw17yn2DAbFPPGAf1YmLGm36vZC9ldv VQbFtYgN1XavWGmi6QqphOWaUEZgYrr/Ytuwv6yF23eJZQmOlYsm/Lr2Z9e4fvcnnK6A 0tfW7x29fbETG3xCgdRdBXo2sf/plDKU6qO5Tn53ziZSxlRTl9AylglnNAGasVaI7hC9 Yf/w== X-Gm-Message-State: AOAM530Gv0TK/TafKkaUVRwi2BkYZclQtrPBY08OsfxydafB4xPBvDZT eeqoDaKIoiaJd2Ahk0kz/M6ttjyLwnJyaw== X-Google-Smtp-Source: ABdhPJwmDe4TeiyHXNWLkfDR7/z3aAPaqP5DPI4cK8MXyUEGjj0lbd2NLtE5oWM4Ep9aq+Gq6kXAdA== X-Received: by 2002:a5d:4f87:: with SMTP id d7mr4360218wru.385.1612523972348; Fri, 05 Feb 2021 03:19:32 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id m205sm8694602wmf.40.2021.02.05.03.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:19:31 -0800 (PST) From: luca.boccassi@gmail.com To: Nick Connolly Cc: David Marchand , dpdk stable Date: Fri, 5 Feb 2021 11:14:49 +0000 Message-Id: <20210205111920.1272063-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal/windows: fix debug build with MinGW' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/10c9525d7c957013d288dc06ba01709a3ac8380b Thanks. Luca Boccassi --- >From 10c9525d7c957013d288dc06ba01709a3ac8380b Mon Sep 17 00:00:00 2001 From: Nick Connolly Date: Fri, 27 Nov 2020 11:07:26 +0000 Subject: [PATCH] eal/windows: fix debug build with MinGW [ upstream commit a7288328a9f5b8e89c86681b35c59ee177566bb9 ] Compiling with MinGW in --buildtype=debug produces a redefinition error for strncasecmp. The root cause is that rte_os.h shouldn't be injecting POSIX definitions into the environment. It is the applications responsibility to decide how to handle missing functionality. Resolving this properly will require further work, but in the meantime wrap all such definitions with #ifndef/#endif. This resolves the specific issue with strncasecmp and handles similar issues that applications may encounter. Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros") Reported-by: David Marchand Signed-off-by: Nick Connolly --- lib/librte_eal/windows/include/rte_os.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h index 569ed92d51..ea3fe60e53 100644 --- a/lib/librte_eal/windows/include/rte_os.h +++ b/lib/librte_eal/windows/include/rte_os.h @@ -25,22 +25,42 @@ extern "C" { #define PATH_MAX _MAX_PATH #endif +#ifndef sleep #define sleep(x) Sleep(1000 * (x)) +#endif +#ifndef strerror_r #define strerror_r(a, b, c) strerror_s(b, c, a) +#endif +#ifndef strdup /* strdup is deprecated in Microsoft libc and _strdup is preferred */ #define strdup(str) _strdup(str) +#endif +#ifndef strtok_r #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr) +#endif +#ifndef index #define index(a, b) strchr(a, b) +#endif + +#ifndef rindex #define rindex(a, b) strrchr(a, b) +#endif +#ifndef strncasecmp #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count) +#endif +#ifndef close #define close _close +#endif + +#ifndef unlink #define unlink _unlink +#endif /* cpu_set macros implementation */ #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2) @@ -89,7 +109,9 @@ eal_strerror(int code) return buffer; } +#ifndef strerror #define strerror eal_strerror +#endif #endif /* RTE_TOOLCHAIN_GCC */ -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:29.491454157 +0000 +++ 0003-eal-windows-fix-debug-build-with-MinGW.patch 2021-02-05 11:18:28.582686848 +0000 @@ -1 +1 @@ -From a7288328a9f5b8e89c86681b35c59ee177566bb9 Mon Sep 17 00:00:00 2001 +From 10c9525d7c957013d288dc06ba01709a3ac8380b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a7288328a9f5b8e89c86681b35c59ee177566bb9 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org