perf tools: Add dummy functions for !HAVE_LZMA_SUPPORT

This allows us to use them without needing to ifdef the calling code.

Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20250307232206.2102440-2-stephen.s.brennan@oracle.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
Stephen Brennan
2025-03-07 15:22:01 -08:00
committed by Namhyung Kim
parent db5af2e4a0
commit 20ef723113

View File

@@ -5,6 +5,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <sys/types.h>
#include <linux/compiler.h>
#ifdef HAVE_ZSTD_SUPPORT
#include <zstd.h>
#endif
@@ -17,6 +18,17 @@ bool gzip_is_compressed(const char *input);
#ifdef HAVE_LZMA_SUPPORT
int lzma_decompress_to_file(const char *input, int output_fd);
bool lzma_is_compressed(const char *input);
#else
static inline
int lzma_decompress_to_file(const char *input __maybe_unused,
int output_fd __maybe_unused)
{
return -1;
}
static inline int lzma_is_compressed(const char *input __maybe_unused)
{
return false;
}
#endif
struct zstd_data {