qemu_getauxval FreeBSD implementation backport (#1366)

This commit is contained in:
David CARLIER 2020-12-31 10:53:36 +00:00 committed by Bet4
parent 00b4a17c1b
commit e2a924a32b

View File

@ -98,6 +98,16 @@ unsigned long qemu_getauxval(unsigned long type)
return 0;
}
#elif defined(__FreeBSD__)
#include <sys/auxv.h>
unsigned long qemu_getauxval(unsigned long type)
{
unsigned long aux = 0;
elf_aux_info(type, &aux, sizeof(aux));
return aux;
}
#else
unsigned long qemu_getauxval(unsigned long type)