The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT
@ 2024-10-01 12:36 James Clark
  2024-10-01 13:47 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: James Clark @ 2024-10-01 12:36 UTC (permalink / raw)
  To: linux-perf-users, acme, namhyung
  Cc: James Clark, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	Liang, Kan, Masami Hiramatsu, Athira Rajeev, Kajol Jain,
	linux-kernel

The linked fixes commit added an #include "dwarf-aux.h" to disasm.h
which gets picked up in a lot of places. Without
HAVE_DWARF_GETLOCATIONS_SUPPORT the stubs return an errno, so include
errno.h to fix the following build error:

  In file included from util/disasm.h:8,
                 from util/annotate.h:16,
                 from builtin-top.c:23:
  util/dwarf-aux.h: In function 'die_get_var_range':
  util/dwarf-aux.h:183:10: error: 'ENOTSUP' undeclared (first use in this function)
    183 |  return -ENOTSUP;
        |          ^~~~~~~

Fixes: 782959ac248a ("perf annotate: Add "update_insn_state" callback function to handle arch specific instruction tracking")
Signed-off-by: James Clark <james.clark@linaro.org>
---
 tools/perf/util/dwarf-aux.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
index 336a3a183a78..bd7505812569 100644
--- a/tools/perf/util/dwarf-aux.h
+++ b/tools/perf/util/dwarf-aux.h
@@ -9,6 +9,7 @@
 #include <elfutils/libdw.h>
 #include <elfutils/libdwfl.h>
 #include <elfutils/version.h>
+#include <errno.h>
 
 struct strbuf;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-01 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 12:36 [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT James Clark
2024-10-01 13:47 ` Arnaldo Carvalho de Melo
2024-10-01 13:51   ` Ian Rogers
2024-10-01 13:57     ` James Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox