]> granicus.if.org Git - postgresql/commit
Fix build on zlib-less environments
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 3 Aug 2017 18:48:54 +0000 (14:48 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 3 Aug 2017 18:55:18 +0000 (14:55 -0400)
commit611840074a9a7f3348ed419e31fc47063228e4b8
treec112624abea321e7221d9bdd41eb08b13a981044
parent1f220c39072bcbee25c247bf7923c009032c3b08
Fix build on zlib-less environments

Commit 4d57e8381677 added support for getting I/O errors out of zlib,
but it introduced a portability problem for systems without zlib.
Repair by wrapping the zlib call inside #ifdef and restore the original
code in the other branch.

This serves to illustrate the inadequacy of the zlib abstraction in
pg_backup_archiver: there is no way to call gzerror() in that
abstraction.  This means that the several places that call GZREAD and
GZWRITE are currently doing error reporting wrongly, but ENOTIME to get
it fixed before next week's release set.

Backpatch to 9.4, like the commit that introduced the problem.
src/bin/pg_dump/pg_backup_tar.c