From d4e8207317ca1827ba2529203d5cc4e67d836fcb Mon Sep 17 00:00:00 2001 From: Robert Wing Date: Sun, 10 Apr 2022 13:37:24 -0800 Subject: [PATCH] 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 --- sys/amd64/vmm/vmm_instruction_emul.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/amd64/vmm/vmm_instruction_emul.c b/sys/amd64/vmm/vmm_instruction_emul.c index 809fa16bce4..06dffe6a80b 100644 --- a/sys/amd64/vmm/vmm_instruction_emul.c +++ b/sys/amd64/vmm/vmm_instruction_emul.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define __diagused #define KASSERT(exp,msg) assert((exp)) #define panic(...) errx(4, __VA_ARGS__) #endif /* _KERNEL */