X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=extensions%2Flibipt_sctp.c;fp=extensions%2Flibipt_sctp.c;h=18fe6adce63406f4151b8280924f85cf593ef0fe;hb=34d283f916eeef73728a99668e40754f3961f580;hp=af35f9ce9f3044711508551e69d5e6fa95f92827;hpb=3bbf6cde0b81310fdef47ebead675dfa6d346f8b;p=iptables.git diff --git a/extensions/libipt_sctp.c b/extensions/libipt_sctp.c index af35f9c..18fe6ad 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