From: Harald Welte Date: Wed, 1 Feb 2006 12:58:28 +0000 (+0000) Subject: Some !%$!*##$@ has modified the kernel include/linux/netfilter_ipv4/ipt_sctp.h X-Git-Tag: v1.3.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54c603a6100e8721efb8de9ea4f596a69970ce02;p=thirdparty%2Fiptables.git Some !%$!*##$@ has modified the kernel include/linux/netfilter_ipv4/ipt_sctp.h file in a way that breaks userspace :( --- diff --git a/extensions/libipt_sctp.c b/extensions/libipt_sctp.c index af35f9ce..18fe6adc 100644 --- a/extensions/libipt_sctp.c +++ b/extensions/libipt_sctp.c @@ -16,8 +16,21 @@ #include #include + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#endif + #include +/* 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