public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: add compat code for kmalloc_array()
@ 2014-06-13  9:18 Antonio Quartulli
  0 siblings, 0 replies; only message in thread
From: Antonio Quartulli @ 2014-06-13  9:18 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

kmalloc_array() was introduced with linux-3.3 therefore
we need some compat code in order to be able to compile
batman-adv against older kernels.

Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
 compat.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compat.h b/compat.h
index 5eb5fe6..28f4cfe 100644
--- a/compat.h
+++ b/compat.h
@@ -274,6 +274,8 @@ static inline void batadv_eth_hw_addr_random(struct net_device *dev)
 	random_ether_addr(dev->dev_addr);
 }
 
+#define kmalloc_array(n, size, flags) kmalloc(n * size, flags)
+
 #endif /* < KERNEL_VERSION(3, 4, 0) */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
-- 
1.8.5.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-13  9:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13  9:18 [B.A.T.M.A.N.] [PATCH] batman-adv: add compat code for kmalloc_array() Antonio Quartulli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox