Xtables 1.26 vs. Linux Kernel 2.6.34[.0] - Compile problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
To: jengelh@xxxxxxxxxx
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).


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux