Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit 46b165b1793c47c1384fa2bac026ee50f5f54eb2 Author: Simon Wunderlich sw@simonwunderlich.de Date: Fri Dec 27 14:05:37 2013 +0100
batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39
Signed-off-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
46b165b1793c47c1384fa2bac026ee50f5f54eb2 compat.h | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/compat.h b/compat.h index a1c8396..92f88ee 100644 --- a/compat.h +++ b/compat.h @@ -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)