iwinfo: move ARRAY_SIZE macro to iwinfo/utils.h
[project/iwinfo.git] / include / iwinfo / utils.h
index d4f32e4..95f9238 100644 (file)
 
 #include "iwinfo.h"
 
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#endif
+
 #define LOG10_MAGIC    1.25892541179
 
 extern struct uci_context *uci_ctx;