From: Hauke Mehrtens Date: Wed, 1 Aug 2012 23:05:23 +0000 (+0200) Subject: compat: add sk_entry X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9afa4a5268e43d6e4db1a8e91d64054df0657d98;p=openwrt%2Fstaging%2Fblogic.git compat: add sk_entry This function is copied from the kernel. Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-2.6.34.h b/include/linux/compat-2.6.34.h index 39bc13b01099..b8b48c03e1e9 100644 --- a/include/linux/compat-2.6.34.h +++ b/include/linux/compat-2.6.34.h @@ -8,6 +8,7 @@ #include #include #include +#include /* * Backports da68c4eb25 @@ -325,6 +326,11 @@ extern struct hlist_node *seq_hlist_start_head(struct hlist_head *head, extern struct hlist_node *seq_hlist_next(void *v, struct hlist_head *head, loff_t *ppos); +static inline struct sock *sk_entry(const struct hlist_node *node) +{ + return hlist_entry(node, struct sock, sk_node); +} + #else /* Kernels >= 2.6.34 */ static inline void init_compat_mmc_pm_flags(void)