From 9e495f68c683574f6b42f9ee19dc156da284aba3 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 17 Aug 2020 09:40:37 -0300 Subject: [PATCH] dwarf_loader: Move vaddr to conditional where it is used To avoid build failures in architectures where HAVE_DWFL_MODULE_BUILD_ID isn't defined. Noticed while cross building for s390x. Signed-off-by: Arnaldo Carvalho de Melo --- dwarf_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwarf_loader.c b/dwarf_loader.c index cdd9561..b8d7b35 100644 --- a/dwarf_loader.c +++ b/dwarf_loader.c @@ -2309,11 +2309,11 @@ static int cus__load_module(struct cus *cus, struct conf_load *conf, { Dwarf_Off off = 0, noff; size_t cuhl; - GElf_Addr vaddr; const unsigned char *build_id = NULL; uint8_t pointer_size, offset_size; #ifdef HAVE_DWFL_MODULE_BUILD_ID + GElf_Addr vaddr; int build_id_len = dwfl_module_build_id(mod, &build_id, &vaddr); #else int build_id_len = 0; -- 2.34.2