summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/compress_gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/compress_gzip.c')
-rw-r--r--src/bin/pg_dump/compress_gzip.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/pg_dump/compress_gzip.c b/src/bin/pg_dump/compress_gzip.c
index ad3b6486027..be31209f811 100644
--- a/src/bin/pg_dump/compress_gzip.c
+++ b/src/bin/pg_dump/compress_gzip.c
@@ -20,6 +20,15 @@
#ifdef HAVE_LIBZ
#include <zlib.h>
+/*
+ * We don't use the gzgetc() macro, because zlib's configuration logic is not
+ * robust enough to guarantee that the macro will have the same ideas about
+ * struct field layout as the library itself does; see for example
+ * https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=59711
+ * Instead, #undef the macro and fall back to the underlying function.
+ */
+#undef gzgetc
+
/*----------------------
* Compressor API
*----------------------