diff --git a/util/compression.h b/util/compression.h index 6522a1f13f6ba451d027cf417eb40966238b4483..1a0488240f7889616e726b3b1287b7100f8723c9 100644 --- a/util/compression.h +++ b/util/compression.h @@ -49,8 +49,10 @@ #include #if ZSTD_VERSION_NUMBER >= 10103 // v1.1.3+ #include -#define ZSTD_STREAMING #endif // ZSTD_VERSION_NUMBER >= 10103 +#if ZSTD_VERSION_NUMBER >= 10400 // v1.4.0+ +#define ZSTD_STREAMING +#endif // ZSTD_VERSION_NUMBER >= 10400 namespace ROCKSDB_NAMESPACE { // Need this for the context allocation override // On windows we need to do this explicitly @@ -516,8 +518,8 @@ inline bool ZSTDNotFinal_Supported() { } inline bool ZSTD_Streaming_Supported() { -#ifdef ZSTD - return ZSTD_versionNumber() >= 10300; +#if defined(ZSTD) && defined(ZSTD_STREAMING) + return true; #else return false; #endif