From f978a728086a981a6b26d4ec72dcf58d071f8587 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 20 Mar 2018 11:48:38 +0100 Subject: src: add ARRAY_SIZE definition Signed-off-by: Pablo Neira Ayuso --- include/conntrackd.h | 4 ++++ include/helper.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/conntrackd.h b/include/conntrackd.h index ece7025..81dff22 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -308,4 +308,8 @@ void select_main_loop(void); int init_config(char *filename); +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#endif + #endif diff --git a/include/helper.h b/include/helper.h index 3c0c5e0..d15c1c6 100644 --- a/include/helper.h +++ b/include/helper.h @@ -68,8 +68,6 @@ struct ctd_helper *helper_find(const char *libdir_path, const char *name, uint8_ type __max2 = (y); \ __max1 > __max2 ? __max1: __max2; }) -#define ARRAY_SIZE MNL_ARRAY_SIZE - enum ip_conntrack_dir { IP_CT_DIR_ORIGINAL, IP_CT_DIR_REPLY, -- cgit v1.2.3