aboutsummaryrefslogtreecommitdiff
path: root/src/common/sysdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/sysdefs.h')
-rw-r--r--src/common/sysdefs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h
index 7b69504c..8ebe476f 100644
--- a/src/common/sysdefs.h
+++ b/src/common/sysdefs.h
@@ -154,4 +154,8 @@ typedef unsigned char _Bool;
# define MAX(x, y) ((x) > (y) ? (x) : (y))
#endif
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+#endif
+
#endif