From 20ef723113cb1265bf187eef4cdbbd8d72a723ee Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Fri, 7 Mar 2025 15:22:01 -0800 Subject: [PATCH] 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 Reviewed-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20250307232206.2102440-2-stephen.s.brennan@oracle.com Signed-off-by: Namhyung Kim --- tools/perf/util/compress.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h index b29109cd3609..a7650353c662 100644 --- a/tools/perf/util/compress.h +++ b/tools/perf/util/compress.h @@ -5,6 +5,7 @@ #include #include #include +#include #ifdef HAVE_ZSTD_SUPPORT #include #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 { -- 2.49.0