From: Antonio Quartulli <antonio@meshcoding.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@meshcoding.com>
Subject: [B.A.T.M.A.N.] [PATCHv2] batman-adv: add compat code for kmalloc_array()
Date: Fri, 13 Jun 2014 11:21:09 +0200 [thread overview]
Message-ID: <1402651269-19233-1-git-send-email-antonio@meshcoding.com> (raw)
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 <antonio@meshcoding.com>
---
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)
--
1.8.5.5
next reply other threads:[~2014-06-13 9:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 9:21 Antonio Quartulli [this message]
2014-06-14 1:56 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: add compat code for kmalloc_array() Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402651269-19233-1-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.