aboutsummaryrefslogtreecommitdiff
path: root/osdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'osdep.h')
-rw-r--r--osdep.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/osdep.h b/osdep.h
index 0666e78b3f..eb3198c78f 100644
--- a/osdep.h
+++ b/osdep.h
@@ -26,6 +26,10 @@
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif
+
#ifndef always_inline
#if (__GNUC__ < 3) || defined(__APPLE__)
#define always_inline inline