diff --git a/contrib/src/zlib/ios-fdopen.patch b/contrib/src/zlib/ios-fdopen.patch new file mode 100644 index 0000000..772f57a --- /dev/null +++ b/contrib/src/zlib/ios-fdopen.patch @@ -0,0 +1,13 @@ +diff --git a/zutil.h b/zutil.h +index 0bc7f4e..4c0c1e8 100644 +--- a/zutil.h ++++ b/zutil.h +@@ -137,7 +137,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ + # endif + #endif + +-#if defined(MACOS) || defined(TARGET_OS_MAC) ++#if defined(MACOS) || (defined(TARGET_OS_MAC) && !TARGET_OS_IPHONE) + # define OS_CODE 7 + # ifndef Z_SOLO + # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os diff --git a/contrib/src/zlib/rules.mak b/contrib/src/zlib/rules.mak index 4dfd37a..739a2d1 100644 --- a/contrib/src/zlib/rules.mak +++ b/contrib/src/zlib/rules.mak @@ -21,6 +21,7 @@ $(TARBALLS)/zlib-$(ZLIB_VERSION).tar.xz: zlib: zlib-$(ZLIB_VERSION).tar.xz .sum-zlib $(UNPACK) $(APPLY) $(SRC)/zlib/no-shared.patch + $(APPLY) $(SRC)/zlib/ios-fdopen.patch $(MOVE) .zlib: zlib diff --git a/contrib/src/png/ios-math-header.patch b/contrib/src/png/ios-math-header.patch new file mode 100644 index 0000000..ba8fbd4 --- /dev/null +++ b/contrib/src/png/ios-math-header.patch @@ -0,0 +1,14 @@ +diff --git a/pngpriv.h b/pngpriv.h +index 2d705b7..d34e3aa 100644 +--- a/pngpriv.h ++++ b/pngpriv.h +@@ -518,7 +518,8 @@ + # include + + # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ +- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) ++ defined(THINK_C) || defined(__SC__) || \ ++ (defined(TARGET_OS_MAC) && !TARGET_OS_IPHONE) + /* We need to check that hasn't already been included earlier + * as it seems it doesn't agree with , yet we should really use + * if possible. diff --git a/contrib/src/png/rules.mak b/contrib/src/png/rules.mak index 31c6355..da2ff3c 100644 --- a/contrib/src/png/rules.mak +++ b/contrib/src/png/rules.mak @@ -20,6 +20,7 @@ png: libpng-$(PNG_VERSION).tar.xz .sum-png $(APPLY) $(SRC)/png/winrt.patch $(APPLY) $(SRC)/png/bins.patch $(APPLY) $(SRC)/png/automake.patch + $(APPLY) $(SRC)/png/ios-math-header.patch $(call pkg_static,"libpng.pc.in") $(MOVE)