From: Eric Bollengier Date: Tue, 8 Feb 2022 07:23:00 +0000 (+0100) Subject: Fix compilation issue on old GCC X-Git-Tag: Beta-15.0.0~482 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=367511f0ff7c4c31c97f9aaf6c97ac53af9ea004;p=thirdparty%2Fbacula.git Fix compilation issue on old GCC --- diff --git a/bacula/src/filed/verify_vol.c b/bacula/src/filed/verify_vol.c index 64d3a3607..497e30c43 100644 --- a/bacula/src/filed/verify_vol.c +++ b/bacula/src/filed/verify_vol.c @@ -309,17 +309,17 @@ void do_verify_volume(JCR *jcr) fdmsg->start_read_sock(); bmessage *bmsg = fdmsg->new_msg(); /* get a message, to exchange with fdmsg */ - if (have_zstd) { - ZSTD_DCtx *pZSTD = ZSTD_createDCtx(); - jcr->ZSTD_decompress_workset = pZSTD; - } +#ifdef HAVE_ZSTD + ZSTD_DCtx *pZSTD = ZSTD_createDCtx(); + jcr->ZSTD_decompress_workset = pZSTD; +#endif - if (have_lzo) { - if (lzo_init() != LZO_E_OK) { - Jmsg(jcr, M_FATAL, 0, _("LZO init failed\n")); - goto bail_out; - } +#ifdef HAVE_LZO + if (lzo_init() != LZO_E_OK) { + Jmsg(jcr, M_FATAL, 0, _("LZO init failed\n")); + goto bail_out; } +#endif /* * Get a record from the Storage daemon