From patchwork Fri Dec 27 13:05:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 3754 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=79.140.42.25; helo=mail.mail.packetmixer.de; envelope-from=sw@simonwunderlich.de; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from mail.mail.packetmixer.de (packetmixer.de [79.140.42.25]) by open-mesh.org (Postfix) with ESMTPS id 891C660029A for ; Fri, 27 Dec 2013 14:05:53 +0100 (CET) Received: from kero.packetmixer.de (p549BDB37.dip0.t-ipconnect.de [84.155.219.55]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mail.packetmixer.de (Postfix) with ESMTPSA id B702A38005; Fri, 27 Dec 2013 13:07:25 +0000 (UTC) From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 27 Dec 2013 14:05:37 +0100 Message-Id: <1388149537-26581-1-git-send-email-sw@simonwunderlich.de> X-Mailer: git-send-email 1.7.10.4 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: fix compat sparse errors for BUILD_BUG_ON in <= 2.6.39 X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 13:05:53 -0000 Signed-off-by: Simon Wunderlich --- 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)