]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
perf tools: Add dummy functions for !HAVE_LZMA_SUPPORT
authorStephen Brennan <stephen.s.brennan@oracle.com>
Fri, 7 Mar 2025 23:22:01 +0000 (15:22 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Mon, 10 Mar 2025 21:36:58 +0000 (14:36 -0700)
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>
tools/perf/util/compress.h

index b29109cd36095c4fe4063cff1d60cf50b420d66d..a7650353c662299137d92e65cd7e5ca43ff19cb4 100644 (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 {