[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250220185512.3357820-2-stephen.s.brennan@oracle.com>
Date: Thu, 20 Feb 2025 10:55:09 -0800
From: Stephen Brennan <stephen.s.brennan@...cle.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Namhyung Kim <namhyung@...nel.org>
Cc: Stephen Brennan <stephen.s.brennan@...cle.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Mark Rutland <mark.rutland@....com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
James Clark <james.clark@...aro.org>,
Chaitanya S Prakash <chaitanyas.prakash@....com>,
Ian Rogers <irogers@...gle.com>, linux-perf-users@...r.kernel.org,
Adrian Hunter <adrian.hunter@...el.com>,
Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH v2 1/3] tools: perf: 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@...cle.com>
---
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 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 {
--
2.43.5
Powered by blists - more mailing lists