mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
This commit is contained in:
parent
ff479cc6c9
commit
6d15ccde4d
1 changed files with 1 additions and 1 deletions
|
|
@ -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); }
|
||||
|
|
|
|||
Loading…
Reference in a new issue