From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Antonio Quartulli Date: Fri, 13 Jun 2014 11:18:04 +0200 Message-Id: <1402651084-13042-1-git-send-email-antonio@meshcoding.com> Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: add compat code for kmalloc_array() 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: , To: b.a.t.m.a.n@lists.open-mesh.org 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 --- 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