Skip to content

Commit

Permalink
qemu_getauxval FreeBSD implementation backport (unicorn-engine#1366)
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen authored and bet4it committed Oct 11, 2021
1 parent 00b4a17 commit e2a924a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qemu/util/getauxval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e2a924a

Please sign in to comment.