]> git.pld-linux.org Git - packages/zlib.git/commitdiff
add workaround for regression in java's jar util; rel 2 auto/th/zlib-1.2.12-2
authorJan Palus <atler@pld-linux.org>
Wed, 30 Mar 2022 14:05:09 +0000 (16:05 +0200)
committerJan Palus <atler@pld-linux.org>
Wed, 30 Mar 2022 14:05:09 +0000 (16:05 +0200)
see https://github.com/madler/zlib/issues/613

java-regr-workaround.patch [new file with mode: 0644]
zlib.spec

diff --git a/java-regr-workaround.patch b/java-regr-workaround.patch
new file mode 100644 (file)
index 0000000..d308a75
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/crc32.c b/crc32.c
+index a1bdce5..748b7ba 100644
+--- a/crc32.c
++++ b/crc32.c
+@@ -19,6 +19,7 @@
+   MAKECRCH can be #defined to write out crc32.h. A main() routine is also
+   produced, so that this one source file can be compiled to an executable.
+  */
++#include <limits.h>
+ #ifdef MAKECRCH
+ #  include <stdio.h>
+@@ -1065,7 +1066,12 @@ unsigned long ZEXPORT crc32(crc, buf, len)
+     const unsigned char FAR *buf;
+     uInt len;
+ {
++/* if sizeof(unsigned long) > 4 */
++#if ULONG_MAX > 0xffffffffUL
++    return crc32_z(crc & 0xffffffffUL, buf, len);
++#else
+     return crc32_z(crc, buf, len);
++#endif
+ }
+ /* ========================================================================= */
index 352e781d7e55c64e96b3b2cb4644eaf6f322c64a..fbbcc2b35c77a43d55975e71b65f1f49bfbffa74 100644 (file)
--- a/zlib.spec
+++ b/zlib.spec
@@ -18,13 +18,14 @@ Summary(tr.UTF-8):  Sıkıştırma işlemleri için kitaplık
 Summary(uk.UTF-8):     Бібліотека для компресії та декомпресії
 Name:          zlib
 Version:       1.2.12
-Release:       1
+Release:       2
 License:       BSD
 Group:         Libraries
 Source0:       http://www.zlib.net/current/%{name}-%{version}.tar.gz
 # Source0-md5: 5fc414a9726be31427b440b434d05f78
 Patch0:                %{name}-asm.patch
 Patch1:                cc.patch
+Patch2:                java-regr-workaround.patch
 URL:           http://www.zlib.net/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -304,6 +305,7 @@ cp contrib/amd64/amd64-match.S match.S
 %endif
 %endif
 %patch1 -p1
+%patch2 -p1
 
 %build
 CC="%{__cc}" \
This page took 0.255511 seconds and 4 git commands to generate.