Skip to content

Commit

Permalink
Port zlib patch 865 (#173)
Browse files Browse the repository at this point in the history
* Port zlib pr 865

* Update patch
  • Loading branch information
anakinxc authored Dec 11, 2023
1 parent d9f18c7 commit 6ba8bd5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
14 changes: 14 additions & 0 deletions bazel/patches/zlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/gzlib.c b/gzlib.c
index 29fc448..9bbf509 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -579,4 +579,9 @@ unsigned ZLIB_INTERNAL gz_intmax(void) {
} while (p > q);
return q >> 1;
}
+#else
+unsigned ZLIB_INTERNAL gz_intmax()
+{
+ return INT_MAX;
+}
#endif
8 changes: 5 additions & 3 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ def _com_github_madler_zlib():
http_archive,
name = "zlib",
build_file = "@yacl//bazel:zlib.BUILD",
strip_prefix = "zlib-1.2.13",
sha256 = "1525952a0a567581792613a9723333d7f8cc20b87a81f920fb8bc7e3f2251428",
strip_prefix = "zlib-1.3",
sha256 = "b5b06d60ce49c8ba700e0ba517fa07de80b5d4628a037f4be8ad16955be7a7c0",
type = ".tar.gz",
patch_args = ["-p1"],
patches = ["@yacl//bazel:patches/zlib.patch"],
urls = [
"https://github.com/madler/zlib/archive/refs/tags/v1.2.13.tar.gz",
"https://github.com/madler/zlib/archive/refs/tags/v1.3.tar.gz",
],
)

Expand Down

0 comments on commit 6ba8bd5

Please sign in to comment.