From patchwork Sun Nov 19 16:12:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17134 X-Patchwork-Delegate: sven@narfation.org Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 68B3F82B04; Sun, 19 Nov 2017 17:12:46 +0100 (CET) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="T7d5Lw0X"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 943498253F for ; Sun, 19 Nov 2017 17:12:26 +0100 (CET) Received: from sven-desktop.home.narfation.org (p200300C593EBC3FD792CD3ECD963554B.dip0.t-ipconnect.de [IPv6:2003:c5:93eb:c3fd:792c:d3ec:d963:554b]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id B9487110113; Sun, 19 Nov 2017 17:12:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1511107945; bh=FQicQdHcjSRt4F2YUNF9cF2sTUA3hzWg3qDV22YVnXM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T7d5Lw0XgByMNbevb6d5uQw9GnlY25h0qJ3TIjAMEVxO1gI5fgKkFRM7dP2fQjXMf AtTwAvyaKUdFajPRFc3OdyZ5wK/HIGTdSqtysqbijU8E1rUMjdSg5Zjdw58QUcR6uP b/jAiXsk9KOPfUbLxmnmwgEx6bN2xMBd4/rHk/2w= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 19 Nov 2017 17:12:03 +0100 Message-Id: <20171119161207.32588-3-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171119161207.32588-1-sven@narfation.org> References: <20171119161207.32588-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 2/6] batman-adv: include build_bug.h for BUILD_BUG_ON define X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" commit bc6245e5efd7 ("bug: split BUILD_BUG stuff out into ") added a new header for BUILD_BUG_ON. It should therefore be included instead of linux/bug.h Signed-off-by: Sven Eckelmann --- compat-include/linux/build_bug.h | 34 ++++++++++++++++++++++++++++++++++ net/batman-adv/main.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 compat-include/linux/build_bug.h diff --git a/compat-include/linux/build_bug.h b/compat-include/linux/build_bug.h new file mode 100644 index 00000000..d1ebfa71 --- /dev/null +++ b/compat-include/linux/build_bug.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: + * + * Marek Lindner, Simon Wunderlich + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * License-Filename: LICENSES/preferred/GPL-2.0 + * + * This file contains macros for maintaining compatibility with older versions + * of the Linux kernel. + */ + +#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_ +#define _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_ + +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) +#include_next +#else +#include +#endif + +#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_ */ diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 45f0f4ff..107b50e5 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -21,7 +21,7 @@ #include "main.h" #include -#include +#include #include #include #include diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index 52e667ec..6b044717 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -22,7 +22,7 @@ #include "main.h" #include -#include +#include #include #include #include diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 66092c6b..db7a67ee 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include