summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-03-20 11:48:38 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-20 13:20:55 +0100
commitf978a728086a981a6b26d4ec72dcf58d071f8587 (patch)
treeddb09395959f685c6246b09e187bda6ff5e1d8d5 /include
parent697e9873fd58ea89f3577cada890c14e3ef59bff (diff)
src: add ARRAY_SIZE definition
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/conntrackd.h4
-rw-r--r--include/helper.h2
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,