]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix compilation issue on old GCC
authorEric Bollengier <eric@baculasystems.com>
Tue, 8 Feb 2022 07:23:00 +0000 (08:23 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
bacula/src/filed/verify_vol.c

index 64d3a36071a230f84c5a2efc01f189ba76e461b4..497e30c4387dce95703cfdf38642b624fa80ca5b 100644 (file)
@@ -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