aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/getauxval.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/getauxval.c b/util/getauxval.c
index 36afdfb9e6..b124107d61 100644
--- a/util/getauxval.c
+++ b/util/getauxval.c
@@ -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)