* [PATCH] iproute2: fix implicit declaration of function '__ALIGN_KERNEL'
@ 2011-07-10 15:46 Gilles Espinasse
2011-08-31 17:59 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Gilles Espinasse @ 2011-07-10 15:46 UTC (permalink / raw)
To: netdev, shemminger; +Cc: Gilles Espinasse
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 <g.esp@free.fr>
---
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. */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iproute2: fix implicit declaration of function '__ALIGN_KERNEL'
2011-07-10 15:46 [PATCH] iproute2: fix implicit declaration of function '__ALIGN_KERNEL' Gilles Espinasse
@ 2011-08-31 17:59 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2011-08-31 17:59 UTC (permalink / raw)
To: Gilles Espinasse; +Cc: netdev
On Sun, 10 Jul 2011 17:46:20 +0200
Gilles Espinasse <g.esp@free.fr> 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 <g.esp@free.fr>
> ---
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-31 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-10 15:46 [PATCH] iproute2: fix implicit declaration of function '__ALIGN_KERNEL' Gilles Espinasse
2011-08-31 17:59 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).