From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39
Date: Fri, 27 Dec 2013 14:05:37 +0100 [thread overview]
Message-ID: <1388149537-26581-1-git-send-email-sw@simonwunderlich.de> (raw)
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
next reply other threads:[~2013-12-27 13:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 13:05 Simon Wunderlich [this message]
2013-12-28 8:40 ` [B.A.T.M.A.N.] [PATCH] batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39 Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388149537-26581-1-git-send-email-sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox