This will allow other implementations within src/ to use a single definition of the ARRAY_SIZE macro. --- src/shared/util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/util.h b/src/shared/util.h index 604dc3be4..9193068d1 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -27,6 +27,8 @@ #include <byteswap.h> #include <string.h> +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + #if __BYTE_ORDER == __LITTLE_ENDIAN #define le16_to_cpu(val) (val) #define le32_to_cpu(val) (val) -- 2.24.1.735.g03f4e72817-goog