On Fri, Jun 15, 2007 at 08:19:59 +0200, Lucas Nussbaum wrote:

> During a rebuild of all packages in sid, your package failed to build on i386.
> 
> Relevant part:
> make[1]: Entering directory 
> `/build/user/iptables-1.3.6.0debian1/debian/build/iptables_profectio'
> Unable to resolve dependency on linux/compiler.h. Try 'make clean'.
> cc -O2 -Wall -Wunused 
> -I/build/user/iptables-1.3.6.0debian1/debian/build/kernel_profectio/include 
> -Iinclude/ -DIPTABLES_VERSION=\"1.3.6\"  -D_UNKNOWN_KERNEL_POINTER_SIZE 
> -DIP6T_LIB_DIR=\"/lib/iptables\" -c -o ip6tables.o ip6tables.c
> In file included from include/libiptc/libip6tc.h:6,
>                  from include/ip6tables.h:5,
>                  from ip6tables.c:38:
> /build/user/iptables-1.3.6.0debian1/debian/build/kernel_profectio/include/linux/netfilter_ipv6/ip6_tables.h:25:28:
>  error: linux/compiler.h: No such file or directory

Hi,

with the attached patch, iptables builds fine.  I'm not sure it's the
correct way to fix it, though, as the headers seem to be shared between
userspace and the kernel, so I don't want to break that if it's not
necessary.

Maybe this would work:
#ifdef __KERNEL__
#include <linux/compiler.h>
#else
#define __user /**/
#endif

Cheers,
Julien
--- iptables-1.3.6.0debian1.orig/linux/include/linux/netfilter_ipv4/ip_tables.h
+++ iptables-1.3.6.0debian1/linux/include/linux/netfilter_ipv4/ip_tables.h
@@ -22,7 +22,6 @@
 #include <linux/ip.h>
 #include <linux/skbuff.h>
 #endif
-#include <linux/compiler.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <linux/netfilter/x_tables.h>
@@ -191,7 +190,7 @@
 	/* Number of counters (must be equal to current number of entries). */
 	unsigned int num_counters;
 	/* The old entries' counters. */
-	struct xt_counters __user *counters;
+	struct xt_counters *counters;
 
 	/* The entries (hang off end: not really an array). */
 	struct ipt_entry entries[0];
only in patch2:
unchanged:
--- iptables-1.3.6.0debian1.orig/linux/include/linux/netfilter_ipv6/ip6_tables.h
+++ iptables-1.3.6.0debian1/linux/include/linux/netfilter_ipv6/ip6_tables.h
@@ -22,7 +22,6 @@
 #include <linux/ipv6.h>
 #include <linux/skbuff.h>
 #endif
-#include <linux/compiler.h>
 #include <linux/netfilter_ipv6.h>
 
 #include <linux/netfilter/x_tables.h>
@@ -204,7 +203,7 @@
 	/* Number of counters (must be equal to current number of entries). */
 	unsigned int num_counters;
 	/* The old entries' counters. */
-	struct xt_counters __user *counters;
+	struct xt_counters *counters;
 
 	/* The entries (hang off end: not really an array). */
 	struct ip6t_entry entries[0];

Attachment: signature.asc
Description: Digital signature

Reply via email to