mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
This is a corrective release over GDB 16.2, fixing the following issues:
PR symtab/32309 ([gdb/symtab, fission] gdb/dwarf2/read.h:289: internal-error: version: Assertion `m_dwarf_version != 0' failed)
PR corefiles/32441 (gdb segfaults when generating a core file if target_fileio_read_alloc fails)
PR tui/32623 (TUI console window doesn't update while inferior is running)
PR corefiles/32634 ([gdb/corefiles] segfault in gdb.arch/i386-biarch-core.exp)
PR backtrace/32757 ("Assertion `stashed' failed" when inline frame #0 is duplicated)
PR tdep/32770 ([gdb/tdep, i386] FAIL: gdb.reverse/recvmsg-reverse.exp: continue to breakpoint: marker2)
PR gdb/32775 ([AArch64] gdbserver crashes on SVE/SME-enabled systems)
PR record/32784 ([gdb/record, aarch64] Stack smashing detected in aarch64_record_asimd_load_store)
PR tui/32797 (Escape sequences to only reset foreground or background color to default fail)
PR gdb/32828 (gstack regression: missing file names and line numbers)
Link: https://github.com/openwrt/openwrt/pull/20543
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
47 lines
1.8 KiB
Diff
47 lines
1.8 KiB
Diff
From 0a084bb6c04e453183530c3e20727be1cc55ff9a Mon Sep 17 00:00:00 2001
|
|
From: Georgi Valkov <gvalkov@gmail.com>
|
|
Date: Mon, 14 Apr 2025 15:18:00 +0300
|
|
Subject: [PATCH] zlib: fix build error with Xcode 16.3
|
|
|
|
Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
|
|
zutil.h conditionally defines fdopen as NULL when this macro is defined,
|
|
resulting in the following build error:
|
|
|
|
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
|
|
318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
|
|
| ^
|
|
./zutil.h:147:33: note: expanded from macro 'fdopen'
|
|
147 | # define fdopen(fd,mode) NULL /* No fdopen() */
|
|
|
|
In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
|
|
block was ignored, gcc and gdb used to compile and work fine.
|
|
|
|
This may have been used for compatibility with older versions of macOS,
|
|
but is no longer needed. By pure luck, the build worked fine for a long
|
|
time, because it did not properly detect macOS.
|
|
Fixed by removing the check for TARGET_OS_MAC.
|
|
|
|
Note that since Xcode 16.3, an entire set of TARGET_OS macros
|
|
are now defined, most of which are set to 0:
|
|
TARGET_OS_LINUX 0
|
|
TARGET_OS_MAC 1
|
|
TARGET_OS_OSX 1
|
|
|
|
[1] https://github.com/openwrt/openwrt/pull/18467
|
|
|
|
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
|
|
---
|
|
zlib/zutil.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/zlib/zutil.h
|
|
+++ b/zlib/zutil.h
|
|
@@ -137,7 +137,7 @@ extern z_const char * const z_errmsg[10]
|
|
# endif
|
|
#endif
|
|
|
|
-#if defined(MACOS) || defined(TARGET_OS_MAC)
|
|
+#if defined(MACOS)
|
|
# define OS_CODE 7
|
|
# ifndef Z_SOLO
|
|
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|