On Tue, Oct 1, 2024 at 6:47 AM Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
On Tue, Oct 01, 2024 at 01:36:25PM +0100, James Clark wrote:
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@xxxxxxxxxx>
There are a few variants of this same patch flying around:
https://lore.kernel.org/lkml/20240919013513.118527-4-yangjihong@xxxxxxxxxxxxx/
https://lore.kernel.org/lkml/20240924003720.617258-4-irogers@xxxxxxxxxx/
Just a heads up that we only need to apply 1.
Thanks,
Ian