From patchwork Mon May 2 15:52:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 16024 X-Patchwork-Delegate: mareklindner@neomailbox.ch 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 EAFF4824DC; Mon, 2 May 2016 17:53:36 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=lunn.ch Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=178.209.37.122; helo=vps0.lunn.ch; envelope-from=andrew@lunn.ch; receiver=b.a.t.m.a.n@lists.open-mesh.net Authentication-Results: open-mesh.org; dmarc=none header.from=lunn.ch Received: from vps0.lunn.ch (vps0.lunn.ch [178.209.37.122]) by open-mesh.org (Postfix) with ESMTPS id 18DED824AE for ; Mon, 2 May 2016 17:53:35 +0200 (CEST) Received: from andrew by vps0.lunn.ch with local (Exim 4.80) (envelope-from ) id 1axG9R-00060S-OK; Mon, 02 May 2016 17:52:49 +0200 From: Andrew Lunn To: "B.A.T.M.A.N" Date: Mon, 2 May 2016 17:52:36 +0200 Message-Id: <1462204366-23047-3-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1462204366-23047-1-git-send-email-andrew@lunn.ch> References: <1462204366-23047-1-git-send-email-andrew@lunn.ch> Subject: [B.A.T.M.A.N.] [PATCH v3 02/12] batman-adv: compat.h: Add workaround for get_link_net() X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 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" Signed-off-by: Sven Eckelmann Signed-off-by: Andrew Lunn --- v2: Fix accidental newline deletion --- compat.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compat.h b/compat.h index 5a5f478..813e637 100644 --- a/compat.h +++ b/compat.h @@ -140,6 +140,13 @@ static int __batadv_interface_kill_vid(struct net_device *dev, __be16 proto,\ #endif /* < KERNEL_VERSION(3, 15, 0) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) + +/* WARNING for batadv_getlink_net */ +#define get_link_net get_xstats_size || 0 || netdev->rtnl_link_ops->get_xstats_size + +#endif /* < KERNEL_VERSION(4, 0, 0) */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) #define IFF_NO_QUEUE 0; dev->tx_queue_len = 0