Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

toolchains: fix building on MacOS with clang 17

The zlib version used by GCC 4.9.4 and binutils 2.26.1
is incompatible with clang 17 from the latest Xcode
command line tools, resulting in fdopen being defined
as NULL.

Remove the define for MacOS, as in zlib 1.31:

https://github.com/madler/zlib/commit/4bd9a71f3539b5ce47f0c67ab5e01f3196dc8ef9

Change-Id: Ic7f3108dc4fcaca4ae9a571f2bdb9039be095f36

authored by

Christian Soffke and committed by
Solomon Peachy
b713f119 2ddcc954

+28 -1
+5 -1
tools/rockboxdev.sh
··· 442 442 443 443 # For Apple targets only 444 444 if [ "$system" == "Darwin" ] ; then 445 - patch="$patch apple_silicon.patch" 445 + patch="$patch apple_silicon.patch apple_silicon-zlib.patch" 446 446 EXTRA_CXXFLAGS="-fbracket-depth=512" 447 447 fi 448 + fi 449 + 450 + if [ "$toolname" == "binutils" ] && [ "$system" == "Darwin" ]; then 451 + patch="$patch apple_silicon-zlib.patch" 448 452 fi 449 453 450 454 # create build directory
+23
tools/toolchain-patches/apple_silicon-zlib.patch
··· 1 + diff --git a/zlib/zutil.h b/zlib/zutil.h 2 + index ed6b127e..3186e991 100644 3 + --- a/zlib/zutil.h 4 + +++ b/zlib/zutil.h 5 + @@ -118,17 +118,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ 6 + # endif 7 + #endif 8 + 9 + -#if defined(MACOS) || defined(TARGET_OS_MAC) 10 + +#if defined(MACOS) 11 + # define OS_CODE 0x07 12 + -# ifndef Z_SOLO 13 + -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os 14 + -# include <unix.h> /* for fdopen */ 15 + -# else 16 + -# ifndef fdopen 17 + -# define fdopen(fd,mode) NULL /* No fdopen() */ 18 + -# endif 19 + -# endif 20 + -# endif 21 + #endif 22 + 23 + #ifdef TOPS20