From: Robert Haas Date: Thu, 27 Jan 2022 20:11:19 +0000 (-0500) Subject: Avoid referencing Z_DEFAULT_COMPRESSION outside HAVE_LIBZ. X-Git-Tag: REL_15_BETA1~819 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ee940843dfed6623b0a0d0b15080aa469116ce0;p=thirdparty%2Fpostgresql.git Avoid referencing Z_DEFAULT_COMPRESSION outside HAVE_LIBZ. Because that's bad. Discussion: http://postgr.es/m/20220127174545.GV23027@telsasoft.com --- diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 851f03ca81a..c351084db31 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1919,7 +1919,7 @@ BaseBackup(void) } AppendStringCommandOption(&buf, use_new_option_syntax, "COMPRESSION", compressmethodstr); - if (compresslevel != 0 && compresslevel != Z_DEFAULT_COMPRESSION) + if (compresslevel >= 1) /* not 0 or Z_DEFAULT_COMPRESSION */ AppendIntegerCommandOption(&buf, use_new_option_syntax, "COMPRESSION_LEVEL", compresslevel); }