From patchwork Wed Dec 17 07:58:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jozsef Kadlecsik X-Patchwork-Id: 422205 X-Patchwork-Delegate: kadlec@blackhole.kfki.hu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3485A140082 for ; Wed, 17 Dec 2014 18:57:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752058AbaLQH5Z (ORCPT ); Wed, 17 Dec 2014 02:57:25 -0500 Received: from smtp-in.kfki.hu ([148.6.0.25]:44695 "EHLO smtp0.kfki.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbaLQH5Y (ORCPT ); Wed, 17 Dec 2014 02:57:24 -0500 Received: from localhost (localhost [127.0.0.1]) by smtp0.kfki.hu (Postfix) with ESMTP id 38B3D67400BE; Wed, 17 Dec 2014 08:57:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at smtp0.kfki.hu Received: from smtp0.kfki.hu ([127.0.0.1]) by localhost (smtp0.kfki.hu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0pUvDSkSgTQu; Wed, 17 Dec 2014 08:57:18 +0100 (CET) Received: from blackhole.kfki.hu (blackhole.kfki.hu [148.6.0.114]) by smtp0.kfki.hu (Postfix) with ESMTP id EBFBC67400B7; Wed, 17 Dec 2014 08:57:16 +0100 (CET) Received: by blackhole.kfki.hu (Postfix, from userid 1000) id 67051211B3; Wed, 17 Dec 2014 08:58:27 +0100 (CET) Date: Wed, 17 Dec 2014 08:58:27 +0100 (CET) From: Jozsef Kadlecsik To: Ricardo Klein cc: netfilter-devel@vger.kernel.org Subject: Re: Building ipset-6.24 on CentOS7 fails In-Reply-To: Message-ID: References: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Tue, 16 Dec 2014, Ricardo Klein wrote: > Trying to build ipset 6.24 on CentOS7 fails... Here is the error: > http://pastebin.com/LDMvs0rv Please try the next patch: is it sufficient on CentOS7? Best regards, Jozse - E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences H-1525 Budapest 114, POB. 49, Hungary --- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/configure.ac b/configure.ac index 4212274..74bc7de 100644 --- a/configure.ac +++ b/configure.ac @@ -376,6 +376,16 @@ else AC_SUBST(HAVE_TCF_EMATCH_STRUCT_NET, undef) fi +AC_MSG_CHECKING([kernel source for list_last_entry]) +if test -f $ksourcedir/include/linux/list.h && \ + $GREP -q 'list_last_entry' $ksourcedir/include/linux/list.h; then + AC_MSG_RESULT(yes) + AC_SUBST(HAVE_LIST_LAST_ENTRY, define) +else + AC_MSG_RESULT(no) + AC_SUBST(HAVE_LIST_LAST_ENTRY, undef) +fi + AC_MSG_CHECKING([kernel source for struct net_generic]) if test -f $ksourcedir/include/net/netns/generic.h && \ $GREP -q 'struct net_generic' $ksourcedir/include/net/netns/generic.h; then 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 */