From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] iproute2: fix implicit declaration of function '__ALIGN_KERNEL' Date: Wed, 31 Aug 2011 10:59:04 -0700 Message-ID: <20110831105904.256a4cec@nehalam.ftrdhcpuser.net> References: <1310312780-2323-1-git-send-email-g.esp@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Gilles Espinasse Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:39069 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756966Ab1HaR7d (ORCPT ); Wed, 31 Aug 2011 13:59:33 -0400 In-Reply-To: <1310312780-2323-1-git-send-email-g.esp@free.fr> Sender: netdev-owner@vger.kernel.org List-ID: On Sun, 10 Jul 2011 17:46:20 +0200 Gilles Espinasse wrote: > Warning seen with 2.6.32 kernel headers > m_xt.c:85: warning: implicit declaration of function '__ALIGN_KERNEL' > > Declaration lines borrowed from iptables-1.4.11.1 > > Signed-off-by: Gilles Espinasse > --- > include/linux/netfilter/x_tables.h | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h > index 4120970..a6614b0 100644 > --- a/include/linux/netfilter/x_tables.h > +++ b/include/linux/netfilter/x_tables.h > @@ -96,6 +96,8 @@ struct _xt_align { > __u64 u64; > }; > > +#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) > +#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) > #define XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _xt_align)) > > /* Standard return verdict, or do jump. */ This was a problem already fixed upstream by the iptables folks in later version. The files in include/linux are automatically generated by a the kernel header script, and I don't want to start a bad precedent by making a special case for this.