summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/error_bootstrap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/error_bootstrap.h')
-rw-r--r--src/vppinfra/error_bootstrap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vppinfra/error_bootstrap.h b/src/vppinfra/error_bootstrap.h
index 18d2176812d..1cd91058574 100644
--- a/src/vppinfra/error_bootstrap.h
+++ b/src/vppinfra/error_bootstrap.h
@@ -88,6 +88,9 @@ do { \
#define STATIC_ASSERT_SIZEOF(d, s) \
STATIC_ASSERT (sizeof (d) == s, "Size of " #d " must be " # s " bytes")
+#define STATIC_ASSERT_SIZEOF_ELT(d, e, s) \
+ STATIC_ASSERT (sizeof (((d *)0)->e) == s, "Size of " #d "." #e " must be " # s " bytes")
+
#define STATIC_ASSERT_OFFSET_OF(s, e, o) \
STATIC_ASSERT (STRUCT_OFFSET_OF(s,e) == o, "Offset of " #s "." #e " must be " # o)