Merge to iptables-1.3.5
[iptables.git] / extensions / libipt_sctp.c
index af35f9c..18fe6ad 100644 (file)
 
 #include <iptables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif
+
 #include <linux/netfilter_ipv4/ipt_sctp.h>
 
+/* Some ZS!#@:$%*#$! has replaced the ELEMCOUNT macro in ipt_sctp.h with
+ * ARRAY_SIZE without noticing that this file is used from userserspace,
+ * and userspace doesn't have ARRAY_SIZE */
+
+#ifndef ELEMCOUNT
+#define ELEMCOUNT ARRAY_SIZE
+#endif
+
 #if 0
 #define DEBUGP(format, first...) printf(format, ##first)
 #define static