diff options
author | Alex Richardson <arichardson@FreeBSD.org> | 2021-10-08 08:35:31 +0000 |
---|---|---|
committer | Alex Richardson <arichardson@FreeBSD.org> | 2021-10-11 10:51:44 +0000 |
commit | 6d15ccde4d9579ad2a77f93630695804a7efcbc4 (patch) | |
tree | 92e76414ed086b6f25ded121f71d6bb00077efc1 /sys | |
parent | ff479cc6c9eeab2fd6f0f98310c65c0906299d82 (diff) | |
download | src-6d15ccde4d9579ad2a77f93630695804a7efcbc4.tar.gz src-6d15ccde4d9579ad2a77f93630695804a7efcbc4.zip |
linuxkpi: Allow BUILD_BUG_ON in if statements without braces
I got a compilation failure in virtio-gpu without this change.
Reviewed By: #linuxkpi, manu, bz, hselasky
Differential Revision: https://reviews.freebsd.org/D32366
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kernel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index aba5896111f7..852603f75f8b 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -105,7 +105,7 @@ } #define BUILD_BUG() do { CTASSERT(0); } while (0) -#define BUILD_BUG_ON(x) _O_CTASSERT(!(x)) +#define BUILD_BUG_ON(x) do { _O_CTASSERT(!(x)) } while (0) #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)) #define BUILD_BUG_ON_INVALID(expr) while (0) { (void)(expr); } |