Avoid referencing Z_DEFAULT_COMPRESSION outside HAVE_LIBZ.

Because that's bad.

Discussion: http://postgr.es/m/20220127174545.GV23027@telsasoft.com
This commit is contained in:
Robert Haas 2022-01-27 15:11:19 -05:00
parent 71cbbbbe80
commit 8ee940843d

View File

@ -1919,7 +1919,7 @@ BaseBackup(void)
} }
AppendStringCommandOption(&buf, use_new_option_syntax, AppendStringCommandOption(&buf, use_new_option_syntax,
"COMPRESSION", compressmethodstr); "COMPRESSION", compressmethodstr);
if (compresslevel != 0 && compresslevel != Z_DEFAULT_COMPRESSION) if (compresslevel >= 1) /* not 0 or Z_DEFAULT_COMPRESSION */
AppendIntegerCommandOption(&buf, use_new_option_syntax, AppendIntegerCommandOption(&buf, use_new_option_syntax,
"COMPRESSION_LEVEL", compresslevel); "COMPRESSION_LEVEL", compresslevel);
} }