public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39
@ 2013-12-27 13:05 Simon Wunderlich
  2013-12-28  8:40 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Wunderlich @ 2013-12-27 13:05 UTC (permalink / raw)
  To: b.a.t.m.a.n

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 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)
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-28  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-27 13:05 [B.A.T.M.A.N.] [PATCH] batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39 Simon Wunderlich
2013-12-28  8:40 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox