[PATCH] limits.h for netfilter_ipv4.h

James Morris jmorris@intercode.com.au
Wed, 22 Mar 2000 19:16:01 +1100 (EST)


On Wed, 22 Mar 2000, Rusty Russell wrote:

> In message <Pine.LNX.4.10.10003221408510.13527-100000@blackbird.intercode.com.a
> u> you write:
> > This fixes a problem (INT_MIN/MAX undefined) when compiling iptables 
> > 1.0.0alpha on a redhat 6.0 system, and possibly other glibc 2.1.1 based 
> > systems.
> 
> Must be fixed in each userspace include: we're not even supposed to be
> including this file from userspace: see how it doesn't include other
> kernel headers outside netfilter?
> 

This is what happens when there's too much blood in my caffeine, sorry.
Please see below.

- James.
--
James Morris
<jmorris@intercode.com.au>


diff -ur iptables-1.0.0alpha.blah/include/libiptc/ipt_kernel_headers.h iptables-1.0.0alpha/include/libiptc/ipt_kernel_headers.h
--- iptables-1.0.0alpha.blah/include/libiptc/ipt_kernel_headers.h	Mon Mar 20 17:03:38 2000
+++ iptables-1.0.0alpha/include/libiptc/ipt_kernel_headers.h	Wed Mar 22 19:03:58 2000
@@ -10,6 +10,7 @@
 #include <netinet/udp.h>
 #include <net/if.h>
 #include <sys/types.h>
+#include <limits.h>
 #else /* libc5 */
 #include <sys/socket.h>
 #include <linux/ip.h>