From patchwork Fri Jun 13 09:21:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 4025 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=178.209.62.157; helo=s3.neomailbox.net; envelope-from=antonio@meshcoding.com; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from s3.neomailbox.net (s3.neomailbox.net [178.209.62.157]) by open-mesh.org (Postfix) with ESMTPS id BD2C7600B74 for ; Fri, 13 Jun 2014 11:22:43 +0200 (CEST) From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 13 Jun 2014 11:21:09 +0200 Message-Id: <1402651269-19233-1-git-send-email-antonio@meshcoding.com> Cc: Antonio Quartulli Subject: [B.A.T.M.A.N.] [PATCHv2] batman-adv: add compat code for kmalloc_array() 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, 13 Jun 2014 09:22:43 -0000 kmalloc_array() was introduced with linux-3.4 therefore we need some compat code in order to be able to compile batman-adv against older kernels. Signed-off-by: Antonio Quartulli --- Changes from v2: - fix linux version in commit message 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)