From patchwork Fri Mar 15 22:18:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 2792 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=5.9.180.86; helo=chaos.universe-factory.net; envelope-from=mschiffer@universe-factory.net; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from chaos.universe-factory.net (chaos.universe-factory.net [5.9.180.86]) by open-mesh.org (Postfix) with ESMTP id 1194E601D52 for ; Fri, 15 Mar 2013 23:18:22 +0100 (CET) Received: from avalon.meute.ffhl (i59F44A8F.versanet.de [89.244.74.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by chaos.universe-factory.net (Postfix) with ESMTPSA id 758D7184930 for ; Fri, 15 Mar 2013 23:18:21 +0100 (CET) From: Matthias Schiffer To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 15 Mar 2013 23:18:17 +0100 Message-Id: <65e1eabaa1dae3e9003482b35ae1d012939ab07b.1363385881.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 1.8.2 Subject: [B.A.T.M.A.N.] [PATCH] Fix compat for for Debian Wheezy kernel v3.2.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, 15 Mar 2013 22:18:23 -0000 Starting with kernel v3.2.39, a Debian specific patch defines eth_hw_addr_random() in include/linux/etherdevice.h, causing the build of batman-adv to fail. This patch fixes the build on these kernels while keeping compatiblity with unpatched kernels by replacing batman-adv's compat definition of the eth_hw_addr_random() function with a #define macro. Signed-off-by: Matthias Schiffer --- compat.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compat.h b/compat.h index e1c6cd2..46baf6c 100644 --- a/compat.h +++ b/compat.h @@ -174,10 +174,7 @@ static inline void skb_reset_mac_len(struct sk_buff *skb) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) -static inline void eth_hw_addr_random(struct net_device *dev) -{ - random_ether_addr(dev->dev_addr); -} +#define eth_hw_addr_random(dev) random_ether_addr((dev)->dev_addr) #endif /* < KERNEL_VERSION(3, 4, 0) */