]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix compilation issue with ZSDT
authorEric Bollengier <eric@baculasystems.com>
Fri, 8 Sep 2023 08:44:52 +0000 (10:44 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:02 +0000 (13:57 +0200)
bacula/src/filed/restore.c

index 0f5c2ca512a08b747eb5d85b1d4647b88e720021..ebe204f1da0e9349a033bf9bd9916de0652d5461 100644 (file)
@@ -408,17 +408,17 @@ void do_restore(JCR *jcr)
    fdmsg->start_read_sock();
    bmessage *bmsg = fdmsg->new_msg(); /* get a message, to exchange with fdmsg */
 
-   if (have_zstd) {
+#ifdef HAVE_ZSTD
       ZSTD_DCtx *pZSTD = ZSTD_createDCtx();
       jcr->ZSTD_decompress_workset = pZSTD;
-   }
+#endif
 
-   if (have_lzo) {
+#ifdef HAVE_LZO
       if (lzo_init() != LZO_E_OK) {
          Jmsg(jcr, M_FATAL, 0, _("LZO init failed\n"));
          goto get_out;
       }
-   }
+#endif
 
    if (have_crypto) {
       rctx.cipher_ctx.buf = get_memory(CRYPTO_CIPHER_MAX_BLOCK_SIZE);