diff options
author | Robert Wing <rew@FreeBSD.org> | 2022-04-10 21:37:24 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2023-01-26 19:27:12 +0000 |
commit | 18003eb854e89b19dcfa4bdd09474bd664b5b116 (patch) | |
tree | d0b7286ff604a49511f867d56137e8e378f7fc40 | |
parent | 25ff80a4bccf7fe1b5150a7243cc3c32d6fa1940 (diff) |
vmm_instruction_emul.c: fix bhyve build
The __diagused macro was used to cure a "set but not used" warning. This
broke the build for bhyve since __diagused is only defined in the
kernel. Define __diagused when not building the kernel.
Fixes: 5241577a223d ("vmm: fix set but not used warning")
Reported by: Jenkins
(cherry picked from commit d4e8207317ca1827ba2529203d5cc4e67d836fcb)
-rw-r--r-- | sys/amd64/vmm/vmm_instruction_emul.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/vmm/vmm_instruction_emul.c b/sys/amd64/vmm/vmm_instruction_emul.c index 809fa16bce46..06dffe6a80b9 100644 --- a/sys/amd64/vmm/vmm_instruction_emul.c +++ b/sys/amd64/vmm/vmm_instruction_emul.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include <string.h> #include <strings.h> #include <vmmapi.h> +#define __diagused #define KASSERT(exp,msg) assert((exp)) #define panic(...) errx(4, __VA_ARGS__) #endif /* _KERNEL */ |