[dpdk-stable] patch 'eal/windows: fix debug build with MinGW' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:14:49 CET 2021


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 <nick.connolly at mayadata.io>
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 <david.marchand at redhat.com>
Signed-off-by: Nick Connolly <nick.connolly at mayadata.io>
---
 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 at dpdk.org


More information about the stable mailing list