summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-10-21 14:00:14 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-11-13 17:21:47 +0800
commit63e13fa011e6a365979aa777752c00b7f2e49127 (patch)
treed5c059bede746cf6d899ecda94397947899f334b /lib
parente160c3eba138d22b25b95df46fdc0e7b9865d902 (diff)
downloadtalos-petitboot-63e13fa011e6a365979aa777752c00b7f2e49127.tar.gz
talos-petitboot-63e13fa011e6a365979aa777752c00b7f2e49127.zip
lib/util: Add build_assert()
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/util/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util/util.h b/lib/util/util.h
index 8c08dc5..ba5ea4f 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -44,5 +44,8 @@
_max_a > _max_b ? _max_a : _max_b; \
})
+#define build_assert(x) \
+ do { (void)sizeof(char[(x)?1:-1]); } while (0)
+
#endif /* UTIL_H */
OpenPOWER on IntegriCloud