fix FTBFS on s390(x)

Version: 1.2.11-2
This commit is contained in:
Pavel Raiskup 2017-02-09 15:01:10 +01:00
parent 4871b1554b
commit 890498eba0
2 changed files with 13 additions and 9 deletions

View File

@ -1,7 +1,8 @@
diff -upr zlib-1.2.7.orig/deflate.c zlib-1.2.7/deflate.c diff --git a/deflate.c b/deflate.c
--- zlib-1.2.7.orig/deflate.c 2012-10-04 12:18:50.750427902 +0200 index 1ec7614..b724c8d 100644
+++ zlib-1.2.7/deflate.c 2012-10-04 12:20:04.222190460 +0200 --- a/deflate.c
@@ -1150,15 +1150,16 @@ local void lm_init (s) +++ b/deflate.c
@@ -1233,15 +1233,16 @@ local void lm_init (s)
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or /* For 80x86 and 680x0, an optimized version will be provided in match.asm or
* match.S. The code will be functionally equivalent. * match.S. The code will be functionally equivalent.
*/ */
@ -14,14 +15,14 @@ diff -upr zlib-1.2.7.orig/deflate.c zlib-1.2.7/deflate.c
+ ptrdiff_t cur_match = pcur_match; /* extend to pointer width */ + ptrdiff_t cur_match = pcur_match; /* extend to pointer width */
unsigned chain_length = s->max_chain_length;/* max hash chain length */ unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */ register Bytef *match; /* matched string */
register int len; /* length of current match */ register int len; /* length of current match */
- int best_len = s->prev_length; /* best match length so far */ - int best_len = (int)s->prev_length; /* best match length so far */
+ ptrdiff_t best_len = s->prev_length; /* best match length so far */ + ptrdiff_t best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */ int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ? IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
s->strstart - (IPos)MAX_DIST(s) : NIL; s->strstart - (IPos)MAX_DIST(s) : NIL;
@@ -1173,12 +1174,12 @@ local uInt longest_match(s, cur_match) @@ -1256,12 +1257,12 @@ local uInt longest_match(s, cur_match)
* Try with and without -DUNALIGNED_OK to check. * Try with and without -DUNALIGNED_OK to check.
*/ */
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;

View File

@ -1,7 +1,7 @@
Summary: The compression and decompression library Summary: The compression and decompression library
Name: zlib Name: zlib
Version: 1.2.11 Version: 1.2.11
Release: 1%{?dist} Release: 2%{?dist}
# /contrib/dotzlib/ have Boost license # /contrib/dotzlib/ have Boost license
License: zlib and Boost License: zlib and Boost
Group: System Environment/Libraries Group: System Environment/Libraries
@ -11,7 +11,7 @@ Source: http://www.zlib.net/zlib-%{version}.tar.xz
# https://github.com/madler/zlib/pull/210 # https://github.com/madler/zlib/pull/210
Patch0: zlib-1.2.5-minizip-fixuncrypt.patch Patch0: zlib-1.2.5-minizip-fixuncrypt.patch
# resolves: #805113 # resolves: #805113
Patch1: zlib-1.2.7-optimized-s390.patch Patch1: zlib-1.2.11-optimized-s390.patch
BuildRequires: automake, autoconf, libtool BuildRequires: automake, autoconf, libtool
@ -138,6 +138,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_libdir}/pkgconfig/minizip.pc %{_libdir}/pkgconfig/minizip.pc
%changelog %changelog
* Thu Feb 09 2017 Pavel Raiskup <praiskup@redhat.com> - 1.2.11-2
- fix s390(x) optimizing patch (FTBFS on s390(x))
* Mon Jan 30 2017 Pavel Raiskup <praiskup@redhat.com> - 1.2.11-1 * Mon Jan 30 2017 Pavel Raiskup <praiskup@redhat.com> - 1.2.11-1
- latest upstream release (rhbz#1409372) - latest upstream release (rhbz#1409372)
- cleanup rpmlint - cleanup rpmlint