[Zlib-devel] [PATCH] Restore gzgetc_ function for binary compatibility.

Jonathan Nieder jrnieder at gmail.com
Tue Feb 14 02:41:13 EST 2012


Since applications built against zlib 1.2.6 make use of the gzgetc_
symbol, we should not remove it.  Otherwise, attempts to run such
applications produce errors:

 ./example: relocation error: ./example: symbol gzgetc_, version \
 ZLIB_1.2.5.2 not defined in file libz.so.1 with link time reference
---
Mark Adler wrote:

> Thanks, applied.  There were actually a lot more places from which to expunge gzgetc_.

Thanks.  Here's a tweak on top.

 gzread.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gzread.c b/gzread.c
index bac5d229..fa00e2fd 100644
--- a/gzread.c
+++ b/gzread.c
@@ -403,6 +403,12 @@ int ZEXPORT gzgetc(file)
     return ret < 1 ? -1 : buf[0];
 }
 
+int ZEXPORT gzgetc_(file)
+gzFile file;
+{
+    return gzgetc(file);
+}
+
 /* -- see zlib.h -- */
 int ZEXPORT gzungetc(c, file)
     int c;
-- 
1.7.9





More information about the Zlib-devel mailing list