From: Jan Palus Date: Wed, 30 Mar 2022 14:05:09 +0000 (+0200) Subject: add workaround for regression in java's jar util; rel 2 X-Git-Tag: auto/th/zlib-1.2.12-2 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=a761d832428b69704ef3d1be98627a62c5c856f8;p=packages%2Fzlib.git add workaround for regression in java's jar util; rel 2 see https://github.com/madler/zlib/issues/613 --- diff --git a/java-regr-workaround.patch b/java-regr-workaround.patch new file mode 100644 index 0000000..d308a75 --- /dev/null +++ b/java-regr-workaround.patch @@ -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 + + #ifdef MAKECRCH + # include +@@ -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 + } + + /* ========================================================================= */ diff --git a/zlib.spec b/zlib.spec index 352e781..fbbcc2b 100644 --- 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}" \