diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2014-12-17 07:44:37 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2015-01-06 08:24:32 +0100 |
commit | c350a7f39402ace2456abe609beb2e6d53b3127a (patch) | |
tree | 522a4e02e1d2d22c78410193ad4b22c13d22d48c /kernel/include | |
parent | 9f497f7e3c931ab8e09bf34957bf652baa0a7fdd (diff) |
Compatibility: check kernel source for list_last_entry
list_last_entry is missing on CentOS7, reported by Ricardo Klein.
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/linux/netfilter/ipset/ip_set_compat.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in index 375a18a..c33de44 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in @@ -40,6 +40,7 @@ #@HAVE_XT_MTCHK_PARAM_STRUCT_NET@ HAVE_XT_MTCHK_PARAM_STRUCT_NET #@HAVE_TCF_EMATCH_OPS_CHANGE_ARG_NET@ HAVE_TCF_EMATCH_OPS_CHANGE_ARG_NET #@HAVE_TCF_EMATCH_STRUCT_NET@ HAVE_TCF_EMATCH_STRUCT_NET +#@HAVE_LIST_LAST_ENTRY@ HAVE_LIST_LAST_ENTRY /* Not everything could be moved here. Compatibility stuffs can be found in * xt_set.c, ip_set_core.c, ip_set_getport.c, pfxlen.c too. @@ -164,4 +165,9 @@ static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value) } #endif +#ifndef HAVE_LIST_LAST_ENTRY +#define list_last_entry(ptr, type, member) \ + list_entry((ptr)->prev, type, member) +#endif + #endif /* __IP_SET_COMPAT_H */ |