diff --git a/cmd/multicall.h b/cmd/multicall.h index bd7cf7d..647e0ba 100644 --- a/cmd/multicall.h +++ b/cmd/multicall.h @@ -20,8 +20,6 @@ #include "libifupdown/libifupdown.h" -#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*x)) - struct if_applet; struct if_option { diff --git a/libifupdown/libifupdown.h b/libifupdown/libifupdown.h index 87cc5fd..33da802 100644 --- a/libifupdown/libifupdown.h +++ b/libifupdown/libifupdown.h @@ -28,4 +28,8 @@ #include "libifupdown/lifecycle.h" #include "libifupdown/tokenize.h" +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*x)) +#endif + #endif