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

 



For example, CentOS 6 kernel-headers-2.6.32-573.18.1.el6.x86_64
linux/netfilter_ipv4.h does not include limits.h and results in this
build error.

  CC	net/proto-ipv4.o
In file included from /usr/include/linux/netfilter_ipv4/ip_tables.h:20,
                 from net/proto-ipv4.c:12:
/usr/include/linux/netfilter_ipv4.h:53: error: ‘INT_MIN’ undeclared here (not in a function)
/usr/include/linux/netfilter_ipv4.h:64: error: ‘INT_MAX’ undeclared here (not in a function)

This was fixed in upstream 3.2 598aaff2ee05c91728e5845956dd9754ed04315c.

commit 598aaff2ee05c91728e5845956dd9754ed04315c
Author: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Date:   Wed Aug 24 18:45:36 2011 +0000

    headers, netfilter: Add missing #include <limits.h> for userland

    Various headers use INT_MIN and INT_MAX, which are defined for
    userland in <limits.h>.

    Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
    Acked-by: Patrick McHardy <kaber@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>

Signed-off-by: Vinson Lee <vlee@xxxxxxxxxxxxxxx>
---
 net/proto-ipv4.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/proto-ipv4.c b/net/proto-ipv4.c
index 0be0263..be24d37 100644
--- a/net/proto-ipv4.c
+++ b/net/proto-ipv4.c
@@ -9,6 +9,7 @@
 #include <arpa/inet.h>
 #include <linux/mroute.h>
 #include <linux/if.h>
+#include <limits.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_arp/arp_tables.h>
-- 
1.7.1

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



[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux