From e9e4ec118f2321cca4f5e6666f73684c32c55330 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Sun, 4 Mar 2018 19:42:50 +0000 Subject: [PATCH] Properly wrap the BUILD_BUG() function macro in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 491199e0f48f..0f34595599f4 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -86,7 +86,7 @@ #define S64_C(x) x ## LL #define U64_C(x) x ## ULL -#define BUILD_BUG() CTASSERT(0) +#define BUILD_BUG() do { CTASSERT(0); } while (0) #define BUILD_BUG_ON(x) CTASSERT(!(x)) #define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x) #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x))