#include "compress.h"
#include "compress_zstd.h"
+#ifdef ENABLE_ZSTD_ADVANCED_APIS
+/* This is a lie, but we make sure it doesn't get us in trouble by wrapping
+ * all invocations of zstd's static-only functions in a check to make sure
+ * that the compile-time version matches the run-time version. */
+#define ZSTD_STATIC_LINKING_ONLY
+#endif
+
#ifdef HAVE_ZSTD
+ DISABLE_GCC_WARNING(unused-const-variable)
#include <zstd.h>
+ ENABLE_GCC_WARNING(unused-const-variable)
#endif
/** Total number of bytes allocated for Zstandard state. */