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 <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2020-08-17 09:40:37 -03:00
parent 69fce76207
commit 9e495f68c6
1 changed files with 1 additions and 1 deletions

View File

@ -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;