batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39
PATCH 1/1 batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39
Signed-off-by Simon Wunderlich <[email protected]>
--- compat.h | 7 +++++++ 1 file changed, 7 insertions(+)
compat.h +7 -0
@@ -207,6 +207,13 @@ static inline void skb_reset_mac_len(struct sk_buff *skb) skb->mac_len = skb->network_header - skb->mac_header; } +#undef BUILD_BUG_ON +#ifdef __CHECKER__ +#define BUILD_BUG_ON (condition) (0) +#else /* __CHECKER__ */ +#define BUILD_BUG_ON (condition) ((void)sizeof(char[1 - 2*!!(condition)])) +#endif /* __CHECKER__ */ +#endif /* < KERNEL_VERSION(3, 0, 0) */ #if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 )
Signature · 1 line
1.7.10.4
Marek Lindner
AppliedQuoted 4 lines · On Friday 27 December 2013 14:05:37 Simon Wunderlich wrote:
Signed-off-by Simon Wunderlich <[email protected]>--- compat.h | 7 +++++++ 1 file changed, 7 insertions(+)
Applied in revision 46b165b.
Thanks,
Marek