diff options
Diffstat (limited to 'src/utils/utils.h')
-rw-r--r-- | src/utils/utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/utils.h b/src/utils/utils.h index 5162945..2a61c2d 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -25,4 +25,8 @@ #define UNUSED(x) ((x)=(x)) #endif +#ifndef N_ELEMENTS +#define N_ELEMENTS(s) (sizeof((s)) / sizeof((s)[0])) +#endif + #endif |