From b12fc0eb0bf933c2a17ba8cf843545335303ae15 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Sun, 29 Mar 2020 09:22:41 +0000 Subject: According to pkg-fallout 11.3-RELEASE-p7 runs into problems building dlls/dbghelp/module.c after upstream changes in the last two weeks due to a specific combination of macros related to ELF being (not) defined: module.c: In function 'image_locate_build_id_target': module.c:643:32: error: 'NT_GNU_BUILD_ID' undeclared (first use in this function) 643 | if (note[2] == NT_GNU_BUILD_ID) | ^~~~~~~~~~~~~~~ Add a patch that I created and provided upstream where it was tentatively ack-ed already. Reported by: pkg-fallout --- emulators/wine-devel/files/patch-dlls-dbghelp | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 emulators/wine-devel/files/patch-dlls-dbghelp (limited to 'emulators/wine-devel/files/patch-dlls-dbghelp') diff --git a/emulators/wine-devel/files/patch-dlls-dbghelp b/emulators/wine-devel/files/patch-dlls-dbghelp new file mode 100644 index 000000000000..cd94b29cbb2c --- /dev/null +++ b/emulators/wine-devel/files/patch-dlls-dbghelp @@ -0,0 +1,61 @@ +From: Gerald Pfeifer +To: wine-devel@winehq.org, Jacek Caban +Date: Sat, 28 Mar 2020 16:23:58 +0100 (CET) +Subject: [PATCH] dbghelp: Define NT_GNU_BUILD_ID regardless of whether __ELF__ is defined. + +[ Jacek, this materialized as a consequence of your changes + over the last 14 days, between Wine 5.4 and Wine 5.5. ] + +In dlls/dbghelp/module.c we have unconditional code like the following: + + if (note[2] == NT_GNU_BUILD_ID) + { + +NT_GNU_BUILD_ID is #defined in image_private.h, which is #included by +module.c, alas that definition is conditional on __ELF__ *not* being +defined: + + #ifndef __ELF__ + : + #ifndef NT_GNU_BUILD_ID + #define NT_GNU_BUILD_ID 3 + #endif + #endif + +This causes problems on some (newer) versions of FreeBSD, where +apparently __ELF__ is defined while NT_GNU_BUILD_ID is not (at +least not without including sys/elf_common.h which we do not). + +I do not have access to the version of FreeBSD 11.3 where that +issue was reported. It did successfully pass on a different +version of FreeBSD 11.3, though. + +Gerald + + +Signed-off-by: Gerald Pfeifer +--- + dlls/dbghelp/image_private.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- UTC +diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h +index 9be6d3ebdc..d3c154b713 100644 +--- dlls/dbghelp/image_private.h ++++ dlls/dbghelp/image_private.h +@@ -52,10 +52,11 @@ + #ifndef SHT_NULL + #define SHT_NULL 0 + #endif ++#endif ++ + #ifndef NT_GNU_BUILD_ID + #define NT_GNU_BUILD_ID 3 + #endif +-#endif + + /* structure holding information while handling an ELF image + * allows one by one section mapping for memory savings +-- +2.25.0 + -- cgit v1.2.3