diff options
Diffstat (limited to 'utils/porting.h')
-rw-r--r-- | utils/porting.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/porting.h b/utils/porting.h index d4ead17d4..f1fdc70aa 100644 --- a/utils/porting.h +++ b/utils/porting.h @@ -45,6 +45,10 @@ #include <dmalloc.h> #endif +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +#endif + /* For SunOS */ #ifndef PATH_MAX #define PATH_MAX _POSIX_PATH_MAX |