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 kstrtou32
@ 2013-11-19  7:26 Antonio Quartulli
  2013-11-21  1:20 ` Marek Lindner
  2013-11-21  3:45 ` Matthias Schiffer
  0 siblings, 2 replies; 8+ messages in thread
From: Antonio Quartulli @ 2013-11-19  7:26 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

kstrtou32() does not exist before 2.6.39. Convert it to
strict_strtoul() in that case.

Used-by: e29249b4483b91d7a590a16e9b5ffe9412ce7fde
("batman-adv: add isolation_mark sysfs attribute")

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 01984b8..334dc5c 100644
--- a/compat.h
+++ b/compat.h
@@ -152,6 +152,8 @@ static inline int batadv_param_set_copystring(const char *val,
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
 
+/* cast last argument of strict_strtoul() because we have a uint32_t */
+#define kstrtou32(cp, base, v) strict_strtoul(cp, base, (unsigned long *)v)
 #define kstrtoul strict_strtoul
 #define kstrtol  strict_strtol
 
-- 
1.8.4.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-21 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19  7:26 [B.A.T.M.A.N.] [PATCH] batman-adv: add compat code for kstrtou32 Antonio Quartulli
2013-11-21  1:20 ` Marek Lindner
2013-11-21  3:45 ` Matthias Schiffer
2013-11-21  7:21   ` Antonio Quartulli
2013-11-21 13:57     ` Matthias Schiffer
2013-11-21 14:20       ` Antonio Quartulli
2013-11-21 14:31         ` Matthias Schiffer
2013-11-21 14:40           ` Antonio Quartulli

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