Skip to contentSkip to conversation

iptables 1.4.2: Fix compile warnings

PATCH In review Thomas Jarosch 2 participants 2 messages Oct 23, 2008 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iptables 1.4.2: Fix compile warnings

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'

extensions/libxt_dccp.c +1 -0
diff -u -r -p iptables-1.4.2.orig/extensions/libxt_dccp.c iptables-1.4.2/extensions/libxt_dccp.c
@@ -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>
extensions/libxt_sctp.c +1 -0
diff -u -r -p iptables-1.4.2.orig/extensions/libxt_sctp.c iptables-1.4.2/extensions/libxt_sctp.c
@@ -14,6 +14,7 @@
 #include <netdb.h>
 #include <ctype.h>
 
+#include <netinet/in.h>
 #include <xtables.h>
 
 #ifndef ARRAY_SIZE
extensions/libxt_tcp.c +1 -0
diff -u -r -p iptables-1.4.2.orig/extensions/libxt_tcp.c iptables-1.4.2/extensions/libxt_tcp.c
@@ -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>
 
extensions/libxt_udp.c +1 -0
diff -u -r -p iptables-1.4.2.orig/extensions/libxt_udp.c iptables-1.4.2/extensions/libxt_udp.c
@@ -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>
 
#1 lore raw
Quoted 4 lines · Thomas Jarosch

Hello Patrick,

attached is a small patch to fix compilation warnings of iptables 1.4.2 using gcc 4.3.2.

Also applied, thanks.