Hello Patrick, attached is a small patch to fix compilation warnings of iptables 1.4.2 using gcc 4.3.2. Cheers, Thomas
Fix compile warnings using gcc 4.3.2 libxt_dccp.c: In function 'port_to_service': libxt_dccp.c:196: warning: implicit declaration of function 'htons' libxt_sctp.c: In function 'port_to_service': libxt_sctp.c:321: warning: implicit declaration of function 'htons' libxt_tcp.c: In function 'port_to_service': libxt_tcp.c:220: warning: implicit declaration of function 'htons' libxt_udp.c: In function 'port_to_service': libxt_udp.c:104: warning: implicit declaration of function 'htons' Signed-off-by: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx> diff -u -r -p iptables-1.4.2.orig/extensions/libxt_dccp.c iptables-1.4.2/extensions/libxt_dccp.c --- iptables-1.4.2.orig/extensions/libxt_dccp.c Thu Oct 23 12:33:44 2008 +++ iptables-1.4.2/extensions/libxt_dccp.c Thu Oct 23 14:19:09 2008 @@ -12,6 +12,7 @@ #include <netdb.h> #include <ctype.h> +#include <netinet/in.h> #include <xtables.h> #include <linux/dccp.h> #include <linux/netfilter/x_tables.h> diff -u -r -p iptables-1.4.2.orig/extensions/libxt_sctp.c iptables-1.4.2/extensions/libxt_sctp.c --- iptables-1.4.2.orig/extensions/libxt_sctp.c Thu Oct 23 12:33:45 2008 +++ iptables-1.4.2/extensions/libxt_sctp.c Thu Oct 23 14:18:28 2008 @@ -14,6 +14,7 @@ #include <netdb.h> #include <ctype.h> +#include <netinet/in.h> #include <xtables.h> #ifndef ARRAY_SIZE diff -u -r -p iptables-1.4.2.orig/extensions/libxt_tcp.c iptables-1.4.2/extensions/libxt_tcp.c --- iptables-1.4.2.orig/extensions/libxt_tcp.c Thu Oct 23 12:33:44 2008 +++ iptables-1.4.2/extensions/libxt_tcp.c Thu Oct 23 14:18:39 2008 @@ -4,6 +4,7 @@ #include <string.h> #include <stdlib.h> #include <getopt.h> +#include <netinet/in.h> #include <xtables.h> #include <linux/netfilter/xt_tcpudp.h> diff -u -r -p iptables-1.4.2.orig/extensions/libxt_udp.c iptables-1.4.2/extensions/libxt_udp.c --- iptables-1.4.2.orig/extensions/libxt_udp.c Thu Oct 23 12:33:44 2008 +++ iptables-1.4.2/extensions/libxt_udp.c Thu Oct 23 14:18:47 2008 @@ -4,6 +4,7 @@ #include <string.h> #include <stdlib.h> #include <getopt.h> +#include <netinet/in.h> #include <xtables.h> #include <linux/netfilter/xt_tcpudp.h>