[arch-commits] Commit in zlib/trunk (PKGBUILD revert-eof-reporting.patch)
Pierre Schmitz
pierre at archlinux.org
Sun Dec 27 17:36:17 UTC 2009
Date: Sunday, December 27, 2009 @ 12:36:16
Author: pierre
Revision: 61897
fix FS#17622
Added:
zlib/trunk/revert-eof-reporting.patch
Modified:
zlib/trunk/PKGBUILD
----------------------------+
PKGBUILD | 8 +++++---
revert-eof-reporting.patch | 18 ++++++++++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2009-12-27 15:04:17 UTC (rev 61896)
+++ PKGBUILD 2009-12-27 17:36:16 UTC (rev 61897)
@@ -3,7 +3,7 @@
pkgname=zlib
pkgver=1.2.3.4
-pkgrel=1
+pkgrel=2
pkgdesc='compression library implementing the deflate compression method found in gzip and PKZIP'
arch=('i686' 'x86_64')
license=('custom')
@@ -12,15 +12,17 @@
depends=('glibc')
# source from http://packages.qa.debian.org/z/zlib.html
source=("ftp://ftp.archlinux.org/other/zlib/zlib-${pkgver}.tar.gz"
- 'install.patch')
+ 'install.patch' 'revert-eof-reporting.patch')
md5sums=('70cad33163abe3c234939a5c63bf95ea'
- 'e0b303fabe9272803ab57d988be1e88e')
+ 'e0b303fabe9272803ab57d988be1e88e'
+ '40293a11f8d5032af18c31c8522feb7e')
build() {
cd ${srcdir}/zlib-$pkgver
export CFLAGS="${CFLAGS/-O2/-O3} -DUNALIGNED_OK"
patch -p1 -i ${srcdir}/install.patch || return 1
+ patch -p1 -i ${srcdir}/revert-eof-reporting.patch || return 1
./configure --prefix=/usr --shared
if [ "${CARCH}" == "x86_64" ]; then
ln -s contrib/amd64/amd64-match.S match.S
Added: revert-eof-reporting.patch
===================================================================
--- revert-eof-reporting.patch (rev 0)
+++ revert-eof-reporting.patch 2009-12-27 17:36:16 UTC (rev 61897)
@@ -0,0 +1,18 @@
+Don't explicitly handle z_eof in gzread(), fall through and let the lack
+of any available data give us our return value. This avoids triggering
+an infinite loop in man-db - I'm not able to convince myself that this
+isn't an issue in man-db at the minute but this avoids the issue.
+
+Index: debian/gzio.c
+===================================================================
+--- debian.orig/gzio.c 2009-12-25 15:52:36.000000000 +0000
++++ debian/gzio.c 2009-12-25 15:52:43.000000000 +0000
+@@ -432,7 +432,7 @@
+ if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
+
+ if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
+- if (s->z_err == Z_STREAM_END || s->z_eof) return 0; /* EOF */
++ if (s->z_err == Z_STREAM_END) return 0; /* EOF */
+
+ next_out = (Byte*)buf;
+ s->stream.next_out = (Bytef*)buf;
More information about the arch-commits
mailing list