patch 'eal/windows: fix build with recent MinGW' has been queued to stable release 21.11.6
Kevin Traynor
ktraynor at redhat.com
Thu Dec 7 12:20:59 CET 2023
Hi,
FYI, your patch has been queued to stable release 21.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/12/23. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b2d5c193dffba21526fe7a2ae0a2c1a0668a0bfe
Thanks.
Kevin
---
>From b2d5c193dffba21526fe7a2ae0a2c1a0668a0bfe Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Tue, 14 Nov 2023 19:05:29 +0200
Subject: [PATCH] eal/windows: fix build with recent MinGW
[ upstream commit c6221c664e52a94baf259a29ea73645496502af1 ]
Windows compilation with cross-mingw on Fedora 39 failed
because MEM_REPLACE_PLACEHOLDER and MEM_RESERVE_PLACEHOLDER were
already defined in the compiler environment:
eal_memory.c:77: error: "MEM_REPLACE_PLACEHOLDER" redefined
/usr/x86_64-w64-mingw32/sys-root/mingw/include/winnt.h:5710: note:
this is the location of the previous definition
eal_memory.c:78: error: "MEM_RESERVE_PLACEHOLDER" redefined
/usr/x86_64-w64-mingw32/sys-root/mingw/include/winnt.h:5715: note:
this is the location of the previous definition
The patch masks MEM_REPLACE_PLACEHOLDER and MEM_RESERVE_PLACEHOLDER
macros if they were pre-defined by compiler.
The patch also masks MEM_COALESCE_PLACEHOLDERS and
MEM_PRESERVE_PLACEHOLDER to prevent similar errors.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
---
lib/eal/windows/eal_memory.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/eal/windows/eal_memory.c b/lib/eal/windows/eal_memory.c
index 2fd37d9708..643e0e7a16 100644
--- a/lib/eal/windows/eal_memory.c
+++ b/lib/eal/windows/eal_memory.c
@@ -73,8 +73,16 @@ static VirtualAlloc2_type VirtualAlloc2_ptr;
#ifdef RTE_TOOLCHAIN_GCC
+#ifndef MEM_COALESCE_PLACEHOLDERS
#define MEM_COALESCE_PLACEHOLDERS 0x00000001
+#endif
+#ifndef MEM_PRESERVE_PLACEHOLDER
#define MEM_PRESERVE_PLACEHOLDER 0x00000002
+#endif
+#ifndef MEM_REPLACE_PLACEHOLDER
#define MEM_REPLACE_PLACEHOLDER 0x00004000
+#endif
+#ifndef MEM_RESERVE_PLACEHOLDER
#define MEM_RESERVE_PLACEHOLDER 0x00040000
+#endif
int
--
2.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-12-07 11:18:59.796221386 +0000
+++ 0007-eal-windows-fix-build-with-recent-MinGW.patch 2023-12-07 11:18:59.617873893 +0000
@@ -1 +1 @@
-From c6221c664e52a94baf259a29ea73645496502af1 Mon Sep 17 00:00:00 2001
+From b2d5c193dffba21526fe7a2ae0a2c1a0668a0bfe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c6221c664e52a94baf259a29ea73645496502af1 ]
+
@@ -25 +26,0 @@
-Cc: stable at dpdk.org
@@ -36 +37 @@
-index 215d768e2c..31410a41fd 100644
+index 2fd37d9708..643e0e7a16 100644
More information about the stable
mailing list