[iptables] Fix compile warnings using gcc 4.3.2

Patrick McHardy netfilter-cvslog-bounces at lists.netfilter.org
Thu Oct 23 15:41:59 CEST 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=ecae0c3efc6851d767c759b77d897d113af821a0
commit ecae0c3efc6851d767c759b77d897d113af821a0
Author:     Thomas Jarosch <thomas.jarosch at intra2net.com>
AuthorDate: Thu Oct 23 15:41:27 2008 +0200
Commit:     Patrick McHardy <kaber at trash.net>
CommitDate: Thu Oct 23 15:41:27 2008 +0200

    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 at intra2net.com>
    Signed-off-by: Patrick McHardy <kaber at trash.net>

commit 240eee607ab7e5bb9f671b7ceba40e2940182f61
Author:     Thomas Jarosch <thomas.jarosch at intra2net.com>
AuthorDate: Thu Oct 23 15:40:52 2008 +0200
Commit:     Patrick McHardy <kaber at trash.net>
CommitDate: Thu Oct 23 15:40:52 2008 +0200

    Fix compile error in libxt_iprange.c using gcc 4.3.2
    
    In file included from libxt_iprange.c:9:
    ../include/linux/netfilter.h:43: error: field 'in' has incomplete type
    ../include/linux/netfilter.h:44: error: field 'in6' has incomplete type
    libxt_iprange.c: In function 'parse_iprange':
    libxt_iprange.c:46: error: dereferencing pointer to incomplete type
    libxt_iprange.c:53: error: dereferencing pointer to incomplete type
    libxt_iprange.c: In function 'iprange_mt4_parse':
    libxt_iprange.c:117: error: dereferencing pointer to incomplete type
    libxt_iprange.c:121: error: dereferencing pointer to incomplete type
    libxt_iprange.c:136: error: dereferencing pointer to incomplete type
    libxt_iprange.c:140: error: dereferencing pointer to incomplete type
    libxt_iprange.c: In function 'iprange_mt6_parse':
    libxt_iprange.c:167: error: dereferencing pointer to incomplete type
    libxt_iprange.c:171: error: dereferencing pointer to incomplete type
    libxt_iprange.c:186: error: dereferencing pointer to incomplete type
    libxt_iprange.c:190: error: dereferencing pointer to incomplete type
    
    Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>
       via  ecae0c3efc6851d767c759b77d897d113af821a0 (commit)
       via  240eee607ab7e5bb9f671b7ceba40e2940182f61 (commit)
      from  c7f0e945e01ad3ab995061e28564adba6ca5e974 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ecae0c3efc6851d767c759b77d897d113af821a0
Author: Thomas Jarosch <thomas.jarosch at intra2net.com>
Date:   Thu Oct 23 15:41:27 2008 +0200

    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 at intra2net.com>
    Signed-off-by: Patrick McHardy <kaber at trash.net>

commit 240eee607ab7e5bb9f671b7ceba40e2940182f61
Author: Thomas Jarosch <thomas.jarosch at intra2net.com>
Date:   Thu Oct 23 15:40:52 2008 +0200

    Fix compile error in libxt_iprange.c using gcc 4.3.2
    
    In file included from libxt_iprange.c:9:
    ../include/linux/netfilter.h:43: error: field 'in' has incomplete type
    ../include/linux/netfilter.h:44: error: field 'in6' has incomplete type
    libxt_iprange.c: In function 'parse_iprange':
    libxt_iprange.c:46: error: dereferencing pointer to incomplete type
    libxt_iprange.c:53: error: dereferencing pointer to incomplete type
    libxt_iprange.c: In function 'iprange_mt4_parse':
    libxt_iprange.c:117: error: dereferencing pointer to incomplete type
    libxt_iprange.c:121: error: dereferencing pointer to incomplete type
    libxt_iprange.c:136: error: dereferencing pointer to incomplete type
    libxt_iprange.c:140: error: dereferencing pointer to incomplete type
    libxt_iprange.c: In function 'iprange_mt6_parse':
    libxt_iprange.c:167: error: dereferencing pointer to incomplete type
    libxt_iprange.c:171: error: dereferencing pointer to incomplete type
    libxt_iprange.c:186: error: dereferencing pointer to incomplete type
    libxt_iprange.c:190: error: dereferencing pointer to incomplete type
    
    Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>

-----------------------------------------------------------------------

 extensions/libxt_dccp.c    |    1 +
 extensions/libxt_iprange.c |    1 +
 extensions/libxt_sctp.c    |    1 +
 extensions/libxt_tcp.c     |    1 +
 extensions/libxt_udp.c     |    1 +
 5 files changed, 5 insertions(+), 0 deletions(-)
In file included from libxt_iprange.c:9:
../include/linux/netfilter.h:43: error: field 'in' has incomplete type
../include/linux/netfilter.h:44: error: field 'in6' has incomplete type
libxt_iprange.c: In function 'parse_iprange':
libxt_iprange.c:46: error: dereferencing pointer to incomplete type
libxt_iprange.c:53: error: dereferencing pointer to incomplete type
libxt_iprange.c: In function 'iprange_mt4_parse':
libxt_iprange.c:117: error: dereferencing pointer to incomplete type
libxt_iprange.c:121: error: dereferencing pointer to incomplete type
libxt_iprange.c:136: error: dereferencing pointer to incomplete type
libxt_iprange.c:140: error: dereferencing pointer to incomplete type
libxt_iprange.c: In function 'iprange_mt6_parse':
libxt_iprange.c:167: error: dereferencing pointer to incomplete type
libxt_iprange.c:171: error: dereferencing pointer to incomplete type
libxt_iprange.c:186: error: dereferencing pointer to incomplete type
libxt_iprange.c:190: error: dereferencing pointer to incomplete type

Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>

diff --git a/extensions/libxt_iprange.c b/extensions/libxt_iprange.c
index 503372f..ee87a6f 100644
--- a/extensions/libxt_iprange.c
+++ b/extensions/libxt_iprange.c
@@ -5,6 +5,7 @@
 #include <stdlib.h>
 #include <getopt.h>
 
+#include <netinet/in.h>
 #include <xtables.h>
 #include <linux/netfilter.h>
 #include <linux/netfilter/xt_iprange.h>



More information about the netfilter-cvslog mailing list