aboutsummaryrefslogtreecommitdiff
path: root/lib/include/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/include/defs.h')
-rw-r--r--lib/include/defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/include/defs.h b/lib/include/defs.h
index e621e71..25f5c4f 100644
--- a/lib/include/defs.h
+++ b/lib/include/defs.h
@@ -32,6 +32,7 @@
/* Compiler related defs */
#define ATTR(X) __attribute__((X))
+#define NELEM(X) (sizeof(X) / sizeof(X[0]))
#define PACKED ATTR(packed)
#define NORETURN ATTR(noreturn)