From eeb40fc689d5050dfcc46215af928f6191de0f7f Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Wed, 19 Aug 2020 01:50:10 -0600 Subject: [PATCH] libifupdown: move ARRAY_SIZE() declaration from multicall --- cmd/multicall.h | 2 -- libifupdown/libifupdown.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) 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