diff mbox

[v3] batman-adv: fix compat for Debian Wheezy kernel v3.2.39

Message ID be7bde49d2b117e29460dc013cb877b410648a1a.1363433383.git.mschiffer@universe-factory.net
State Accepted, archived
Commit d4e5e0143fe81cfe804e753f9d7cc3d9e6447e86
Headers show

Commit Message

Matthias Schiffer March 16, 2013, 11:30 a.m. UTC
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 renaming batman-adv's compat definition of the
eth_hw_addr_random() function to resolve the name conflict and adding a #define
macro.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
---
 compat.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Marek Lindner March 18, 2013, 8:25 a.m. UTC | #1
On Saturday, March 16, 2013 19:30:10 Matthias Schiffer wrote:
> 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 renaming batman-adv's compat definition of the
> eth_hw_addr_random() function to resolve the name conflict and adding a
> #define macro.
> 
> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
> ---
>  compat.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied in revision d4e5e01.

Thanks,
Marek
diff mbox

Patch

diff --git a/compat.h b/compat.h
index e1c6cd2..d955166 100644
--- a/compat.h
+++ b/compat.h
@@ -174,7 +174,9 @@  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)
+#define eth_hw_addr_random(dev)	batadv_eth_hw_addr_random(dev)
+
+static inline void batadv_eth_hw_addr_random(struct net_device *dev)
 {
 	random_ether_addr(dev->dev_addr);
 }