* [B.A.T.M.A.N.] [PATCH] Fix compat for for Debian Wheezy kernel v3.2.39
@ 2013-03-15 22:18 Matthias Schiffer
2013-03-16 10:59 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix compat " Matthias Schiffer
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Schiffer @ 2013-03-15 22:18 UTC (permalink / raw)
To: b.a.t.m.a.n
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 <mschiffer@universe-factory.net>
---
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) */
--
1.8.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix compat for Debian Wheezy kernel v3.2.39
2013-03-15 22:18 [B.A.T.M.A.N.] [PATCH] Fix compat for for Debian Wheezy kernel v3.2.39 Matthias Schiffer
@ 2013-03-16 10:59 ` Matthias Schiffer
2013-03-16 11:10 ` Marek Lindner
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Schiffer @ 2013-03-16 10:59 UTC (permalink / raw)
To: b.a.t.m.a.n
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 <mschiffer@universe-factory.net>
---
v2: fix commit message
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) */
--
1.8.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix compat for Debian Wheezy kernel v3.2.39
2013-03-16 10:59 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix compat " Matthias Schiffer
@ 2013-03-16 11:10 ` Marek Lindner
2013-03-16 11:30 ` [B.A.T.M.A.N.] [PATCHv3] " Matthias Schiffer
0 siblings, 1 reply; 5+ messages in thread
From: Marek Lindner @ 2013-03-16 11:10 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Saturday, March 16, 2013 18:59:55 Matthias Schiffer wrote:
> @@ -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) */
How about re-defining the function name and keep the static inline ? There are
numerous examples of this in the compat.h file, for instance
batadv_this_cpu_add().
We also might want a comment there that we do this for Debian compat.
Cheers,
Marek
^ permalink raw reply [flat|nested] 5+ messages in thread
* [B.A.T.M.A.N.] [PATCHv3] batman-adv: fix compat for Debian Wheezy kernel v3.2.39
2013-03-16 11:10 ` Marek Lindner
@ 2013-03-16 11:30 ` Matthias Schiffer
2013-03-18 8:25 ` Marek Lindner
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Schiffer @ 2013-03-16 11:30 UTC (permalink / raw)
To: b.a.t.m.a.n
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(-)
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);
}
--
1.8.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv3] batman-adv: fix compat for Debian Wheezy kernel v3.2.39
2013-03-16 11:30 ` [B.A.T.M.A.N.] [PATCHv3] " Matthias Schiffer
@ 2013-03-18 8:25 ` Marek Lindner
0 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2013-03-18 8:25 UTC (permalink / raw)
To: b.a.t.m.a.n
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-18 8:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 22:18 [B.A.T.M.A.N.] [PATCH] Fix compat for for Debian Wheezy kernel v3.2.39 Matthias Schiffer
2013-03-16 10:59 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix compat " Matthias Schiffer
2013-03-16 11:10 ` Marek Lindner
2013-03-16 11:30 ` [B.A.T.M.A.N.] [PATCHv3] " Matthias Schiffer
2013-03-18 8:25 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).