I sent the following bug report to the maintainers, too, but thought I'd file it here for good measure. When building zlib as a shared library, it is possible on a number of platforms to make symbols which are entirely internal to the library invisible to anything linking to it. Solaris uses what it calls a mapfile, and GNU ld uses a version script, but they're exactly the same thing (for these purposes, at any rate). This came up because a recent build of zsh broke due to it defining a function, zcalloc(), which was duplicated in zlib, even though it's not part of the official zlib interface. The attached patch works on Linux and Solaris, and "make test" passes. The version of zlib shipped in Solaris uses the exact same mapfile, so it should be well tested. (For completeness, the Solaris version uses an LDSHARED set to -G -KPIC -h libz.so.1 -z defs -z text -z combreloc -M mapfile -L. -lc but that's somewhat beyond the scope of this bug report.)
Created attachment 20277 [details, diff] Aforementioned patch
Did you receive any feedback from the zlib guys yet ?
Nope. I'll follow-up when I do, but I don't have any sense for how responsive they are, so no guarantees on when that might be. :)
Ok, added in -r4.
Could you please check if this issue (and thus the patch still necessary) in recent zlib release ?