netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Xtables 1.26 vs. Linux Kernel 2.6.34[.0] - Compile problem
@ 2010-05-21 11:41 Jan Engelhardt
  2010-05-21 11:50 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2010-05-21 11:41 UTC (permalink / raw)
  To: Netfilter Developer Mailing List; +Cc: d.stussy, Patrick McHardy, adobriyan


Forwarding to nf-dev for the records...


Seems like we need #include <linux/kernel.h> in x_tables.h now.


---------- Forwarded message ----------
Date: Fri, 21 May 2010 02:35:12
From: - <d.stussy@yahoo.com>
To: jengelh@medozas.de
Subject: Xtables 1.26 vs. Linux Kernel 2.6.34[.0] - Compile problem.

(compiling against kernel headers - for modules):

make[3]: Entering directory `/usr/src/xtables-addons-1.26/extensions'
  CC     libxt_CHAOS.oo
libxt_CHAOS.c:99: warning: implicit declaration of function `ALIGN'
libxt_CHAOS.c:99: error: initializer element is not constant
libxt_CHAOS.c:99: error: (near initialization for `chaos_tg_reg.size')
libxt_CHAOS.c:100: error: initializer element is not constant
libxt_CHAOS.c:100: error: (near initialization for `chaos_tg_reg.userspacesize')
make[3]: *** [libxt_CHAOS.oo] Error 1
make[3]: Leaving directory `/usr/src/xtables-addons-1.26/extensions'
make[2]: *** [user-all-local] Error 2
make[2]: Leaving directory `/usr/src/xtables-addons-1.26/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/xtables-addons-1.26'
make: *** [all] Error 2


The error is caused by this change in the kernel header files:

--- /usr/include/linux/netfilter/x_tables.h - From Linux Kernel 2.6.33.4
+++ /tmp/include/linux/netfilter/x_tables.h - From Linux Kernel 2.6.34.0
@@ -93,8 +93,7 @@
        __u64 u64;
 };
 
-#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1))         \
-                       & ~(__alignof__(struct _xt_align)-1))
+#define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align))
 
 /* Standard return verdict, or do jump. */
 #define XT_STANDARD_TARGET ""
----------(end of diff )---------------

Including the above header file did NOT help:

# grep -r ALIGN /usr/include/linux/
/usr/include/linux/linkage.h:#define ALIGN __ALIGN


Using the 2.6.33.4 version of the header file allowed compilation.  Therefore, I have a working set of modules (using 2.6.33.4 headers).



^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Xtables 1.26 vs. Linux Kernel 2.6.34[.0] - Compile problem
@ 2010-05-21 19:14 -
  2010-05-21 19:17 ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: - @ 2010-05-21 19:14 UTC (permalink / raw)
  To: Jan Engelhardt, Patrick McHardy
  Cc: Netfilter Developer Mailing List, adobriyan

Did commit a79ff731a1b277d0e92d9453bdf374e04cec717a make it into the 2.6.34.0 kernel release?  It appears not to have, at least when I looked at my source code archive....  The kernel is dated 2010-05-16, yet I did NOT see this patch in the changelog despite its April 13 date.

--- On Fri, 5/21/10, Patrick McHardy <kaber@trash.net> wrote:
> To: "Jan Engelhardt" <jengelh@medozas.de>
> Cc: "Netfilter Developer Mailing List" <netfilter-devel@vger.kernel.org>, d.stussy@yahoo.com, adobriyan@gmail.com
> Jan Engelhardt wrote:
> > Forwarding to nf-dev for the records...
> > 
> > Seems like we need #include <linux/kernel.h> in x_tables.h now.
> 
> 
> This should be fixed by commit a79ff731, "netfilter: xtables: make
> XT_ALIGN() usable in exported headers by exporting __ALIGN_KERNEL()"
> > ---------- Forwarded message ----------
> > From: - <d.stussy@yahoo.com>
> > To: jengelh@medozas.de
> > 
> > (compiling against kernel headers - for modules):
> > 
> > make[3]: Entering directory `/usr/src/xtables-addons-1.26/extensions'
> >   CC     libxt_CHAOS.oo
> > libxt_CHAOS.c:99: warning: implicit declaration of function `ALIGN'
> > libxt_CHAOS.c:99: error: initializer element is not constant
> > ...
> 
> -----Inline Attachment Follows-----
> commit a79ff731a1b277d0e92d9453bdf374e04cec717a
> Author: Alexey Dobriyan <adobriyan@gmail.com>
> Date:   Tue Apr 13 11:21:46 2010 +0200
> ...



--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-21 19:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 11:41 Xtables 1.26 vs. Linux Kernel 2.6.34[.0] - Compile problem Jan Engelhardt
2010-05-21 11:50 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2010-05-21 19:14 -
2010-05-21 19:17 ` Jan Engelhardt

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).