From: Stephen Brennan Date: Fri, 7 Mar 2025 23:22:01 +0000 (-0800) Subject: perf tools: Add dummy functions for !HAVE_LZMA_SUPPORT X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=20ef723113cb1265bf187eef4cdbbd8d72a723ee;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h index b29109cd36095..a7650353c6622 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 {