summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/ltt-core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/ltt-core.h b/include/linux/ltt-core.h
index acb696ed106..d02c1e64544 100644
--- a/include/linux/ltt-core.h
+++ b/include/linux/ltt-core.h
@@ -12,6 +12,14 @@
/* Keep track of trap nesting inside LTT */
DECLARE_PER_CPU(unsigned int, ltt_nesting);
+#ifndef MAYBE_BUILD_BUG_ON
+#define MAYBE_BUILD_BUG_ON(cond) \
+ do { \
+ if (__builtin_constant_p(cond)) \
+ BUILD_BUG_ON(cond); \
+ } while (0)
+#endif
+
#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
/*