Skip to content

Commit e298985

Browse files
committed
fix bundled zlib failure
Replaced a bad path. On modern macOS, both `TARGET_OS_MAC` and `__APPLE__` can be visible. So the old "no fdopen()” path runs and the macro replaces fdopen() with NULL and corrupts it.
1 parent d88c0fd commit e298985

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎patches/gcc-7.2.0-PS3.patch‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,3 +725,16 @@ index bedcf1017..8d6c8feff 100644
725725
powerpc*-*-linux*)
726726
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc"
727727
tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000"
728+
729+
diff --git a/zlib/zutil.h b/zlib/zutil.h
730+
--- a/zlib/zutil.h
731+
+++ b/zlib/zutil.h
732+
@@ -137,7 +137,7 @@
733+
# endif
734+
#endif
735+
736+
-#if defined(MACOS) || defined(TARGET_OS_MAC)
737+
+#if defined(MACOS) || (defined(TARGET_OS_MAC) && !defined(__APPLE__))
738+
# define OS_CODE 7
739+
# ifndef Z_SOLO
740+
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os

0 commit comments

Comments
 (0)