]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Some !%$!*##$@ has modified the kernel include/linux/netfilter_ipv4/ipt_sctp.h
authorHarald Welte <laforge@gnumonks.org>
Wed, 1 Feb 2006 12:58:28 +0000 (12:58 +0000)
committerHarald Welte <laforge@gnumonks.org>
Wed, 1 Feb 2006 12:58:28 +0000 (12:58 +0000)
file in a way that breaks userspace :(

extensions/libipt_sctp.c

index af35f9ce9f3044711508551e69d5e6fa95f92827..18fe6adce63406f4151b8280924f85cf593ef0fe 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