[PATCH 1/2 conntrackd] src: add ARRAY_SIZE definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 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 ece702543082..81dff221e96d 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 3c0c5e00d6c5..d15c1c62c053 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,
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux