Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-12-31 18:02:31 +0400
committerFelix Fietkau <nbd@openwrt.org>2012-12-31 18:24:27 +0400
commit9c8ab5d64cb1bfc6f8a235af5913ed3537c38e2a (patch)
treebae633850c3c52754b981e86f7933d89397a2893 /utils.h
parentd03a6a27c7fcdca70db417c15cdccc0185b1efef (diff)
utils: move ARRAY_SIZE from uloop to utils.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index e56998d..065a28b 100644
--- a/utils.h
+++ b/utils.h
@@ -34,4 +34,8 @@
void *__calloc_a(size_t len, ...);
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#endif
+
#endif