summaryrefslogtreecommitdiff
path: root/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'defs.h')
-rw-r--r--defs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/defs.h b/defs.h
index 3c176b5..d6b27f2 100644
--- a/defs.h
+++ b/defs.h
@@ -139,3 +139,6 @@ struct inode* mknod1(struct inode*, char*, short, short, short);
int unlink(char*);
void iupdate(struct inode*);
int link(char*, char*);
+
+// number of elements in fixed-size array
+#define NELEM(x) (sizeof(x)/sizeof((x)[0]))