Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stephen Brennan and committed by
Namhyung Kim
20ef7231 db5af2e4

+12
+12
tools/perf/util/compress.h
··· 5 5 #include <stdbool.h> 6 6 #include <stddef.h> 7 7 #include <sys/types.h> 8 + #include <linux/compiler.h> 8 9 #ifdef HAVE_ZSTD_SUPPORT 9 10 #include <zstd.h> 10 11 #endif ··· 18 17 #ifdef HAVE_LZMA_SUPPORT 19 18 int lzma_decompress_to_file(const char *input, int output_fd); 20 19 bool lzma_is_compressed(const char *input); 20 + #else 21 + static inline 22 + int lzma_decompress_to_file(const char *input __maybe_unused, 23 + int output_fd __maybe_unused) 24 + { 25 + return -1; 26 + } 27 + static inline int lzma_is_compressed(const char *input __maybe_unused) 28 + { 29 + return false; 30 + } 21 31 #endif 22 32 23 33 struct zstd_data {