chiark / gitweb /
Fix build without any compression enabled
[elogind.git] / src / journal / compress.c
index 93ac92aaadb8ffb9f4615f1d1b86325fd77d9e96..316c1a66e3e2f13f9608feca7ef0f3195eff3d8d 100644 (file)
@@ -343,6 +343,7 @@ int decompress_startswith(int compression,
 }
 
 int compress_stream_xz(int fdf, int fdt, off_t max_bytes) {
+#ifdef HAVE_XZ
         _cleanup_(lzma_end) lzma_stream s = LZMA_STREAM_INIT;
         lzma_ret ret;
 
@@ -414,6 +415,9 @@ int compress_stream_xz(int fdf, int fdt, off_t max_bytes) {
                         }
                 }
         }
+#else
+        return -EPROTONOSUPPORT;
+#endif
 }
 
 #define LZ4_BUFSIZE (512*1024)