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
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}