aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
authorStephen Brennan <stephen.s.brennan@oracle.com>2025-03-07 15:22:01 -0800
committerNamhyung Kim <namhyung@kernel.org>2025-03-10 14:36:58 -0700
commit20ef723113cb1265bf187eef4cdbbd8d72a723ee (patch)
treea852cd97758391f7fa3b69298d7a4960e8d61015 /tools/perf
parentdb5af2e4a02c9b3744453a84657ed1fc54a1ef82 (diff)
downloadath-20ef723113cb1265bf187eef4cdbbd8d72a723ee.tar.gz
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>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/compress.h12
1 files changed, 12 insertions, 0 deletions
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 <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 {