aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
authorWarner Losh <imp@bsdimp.com>2023-08-13 10:41:22 +0200
committerWarner Losh <imp@bsdimp.com>2023-08-28 12:16:18 -0600
commit25e2cfbb8e621a4a726040427f14dca68f78bd1b (patch)
tree5e42372f2f74b195d62c54e97838db060c5733b6 /include/qemu/osdep.h
parent4436e2ff6cae585f4863fa59a3ad77dd3c54ac63 (diff)
downloadqemu-25e2cfbb8e621a4a726040427f14dca68f78bd1b.zip
qemu-25e2cfbb8e621a4a726040427f14dca68f78bd1b.tar.gz
qemu-25e2cfbb8e621a4a726040427f14dca68f78bd1b.tar.bz2
bsd-user: Move _WANT_FREEBSD macros to include/qemu/osdep.h
move _WANT_FREEBSD macros from bsd-user/freebsd/os-syscall.c to include/qemu/osdep.h in order to pull some struct defintions needed later in the build. Signed-off-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com> Acked-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 21ef8f1..2cae135 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -88,6 +88,19 @@ QEMU_EXTERN_C int daemon(int, int);
#define __USE_MINGW_ANSI_STDIO 1
#endif
+/*
+ * We need the FreeBSD "legacy" definitions. Rust needs the FreeBSD 11 system
+ * calls since it doesn't use libc at all, so we have to emulate that despite
+ * FreeBSD 11 being EOL'd.
+ */
+#ifdef __FreeBSD__
+#define _WANT_FREEBSD11_STAT
+#define _WANT_FREEBSD11_STATFS
+#define _WANT_FREEBSD11_DIRENT
+#define _WANT_KERNEL_ERRNO
+#define _WANT_SEMUN
+#endif
+
#include <stdarg.h>
#include <stddef.h>
#include <stdbool.h>