In linux version < 2.6.37 hlist_first_rcu() and hlist_next_rcu() do not exist and therefore they need to be backported.
Signed-off-by: Antonio Quartulli ordex@autistici.org --- compat.h | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/compat.h b/compat.h index e1c6cd2..6a7e03b 100644 --- a/compat.h +++ b/compat.h @@ -129,6 +129,12 @@ static inline int batadv_param_set_copystring(const char *val,
#endif /* < KERNEL_VERSION(2, 6, 36) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) + +#define hlist_first_rcu(head) (*((struct hlist_node __rcu **)(&(head)->first))) +#define hlist_next_rcu(node) (*((struct hlist_node __rcu **)(&(node)->next))) + +#endif /* < KERNEL_VERSION(2, 6, 37) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
@@ -236,6 +242,7 @@ static int __batadv_interface_set_mac_addr(x, y) ASSERT_RTNL();\ dev->master;\ }) + #define hlist_entry_safe(ptr, type, member) \ (ptr) ? hlist_entry(ptr, type, member) : NULL