From b52a9567520570bd6c850bcad3a6966f68639ef7 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 17 Sep 2020 13:09:06 +0200 Subject: Add a check whether libzstd supports stream compression Streaming compression was added fairly recently to zstd (and then the API was changed a few times). Rather than rely on libzstd versioning macros, this commit adds an m4 script to test at configure time if the enums/functions we need are available by trying to compile a small sample. Signed-off-by: David Oberhollenzer --- lib/fstream/compress/ostream_compressor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/fstream/compress/ostream_compressor.c') diff --git a/lib/fstream/compress/ostream_compressor.c b/lib/fstream/compress/ostream_compressor.c index 7ea7919..30ff7eb 100644 --- a/lib/fstream/compress/ostream_compressor.c +++ b/lib/fstream/compress/ostream_compressor.c @@ -78,7 +78,7 @@ ostream_t *ostream_compressor_create(ostream_t *strm, int comp_id) #endif break; case FSTREAM_COMPRESSOR_ZSTD: -#ifdef WITH_ZSTD +#if defined(WITH_ZSTD) && defined(HAVE_ZSTD_STREAM) comp = ostream_zstd_create(strm->get_filename(strm)); #endif break; -- cgit v1.2.3