Skip to content

Commit 7f1a15f

Browse files
authored
fix more zlib versions (#8809)
* fix more zlib versions * improve patches
1 parent 1eb0904 commit 7f1a15f

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/zutil.h b/zutil.h
2+
index b079ea6..4c7465e 100644
3+
--- a/zutil.h
4+
+++ b/zutil.h
5+
@@ -133,7 +133,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
6+
#if defined(MACOS) || defined(TARGET_OS_MAC)
7+
# define OS_CODE 7
8+
# ifndef Z_SOLO
9+
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
10+
+# if defined(__APPLE__)
11+
+# /* macOS provides fdopen, don't redefine it */
12+
+# elif defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
13+
# include <unix.h> /* for fdopen */
14+
# else
15+
# ifndef fdopen
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/zutil.h b/zutil.h
2+
index d9a20ae..e15770b 100644
3+
--- a/zutil.h
4+
+++ b/zutil.h
5+
@@ -140,7 +140,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
6+
#if defined(MACOS) || defined(TARGET_OS_MAC)
7+
# define OS_CODE 7
8+
# ifndef Z_SOLO
9+
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
10+
+# if defined(__APPLE__)
11+
+# /* macOS provides fdopen, don't redefine it */
12+
+# elif defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
13+
# include <unix.h> /* for fdopen */
14+
# else
15+
# ifndef fdopen

packages/z/zlib/xmake.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ package("zlib")
1313
add_versions("v1.3", "b5b06d60ce49c8ba700e0ba517fa07de80b5d4628a037f4be8ad16955be7a7c0")
1414
add_versions("v1.3.1", "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c")
1515

16+
add_patches("v1.2.10", "patches/v1.2.10/fix-macosx-fdopen.patch", "382a129e1e604c0da6121e993cd2e7e70069fb287dcdf85a9aa9ff5bd7cb7872")
17+
add_patches("v1.2.11", "patches/v1.2.10/fix-macosx-fdopen.patch", "382a129e1e604c0da6121e993cd2e7e70069fb287dcdf85a9aa9ff5bd7cb7872")
18+
add_patches("v1.2.12", "patches/v1.2.12/fix-macosx-fdopen.patch", "9ccc43fbd2946fabb688ed687506710ed42bf6039d1034060183f8c5cb65a7ff")
1619
add_patches("v1.2.13", "patches/v1.2.13/fix-macosx-fdopen.patch", "4ed4e669e853b9490ec39df35739ba4bbf08dcb245c8f5e26659e736c3007685")
1720

1821
add_configs("zutil", {description = "Export zutil.h api", default = false, type = "boolean"})

0 commit comments

Comments
 (0)