[ovs-dev] [patch] ovs-datapath: include net/udp.h vport-capwap.c

Simon Horman horms at verge.net.au
Tue Aug 31 02:47:28 UTC 2010


net/udp.h is currently included indirectly via
linux/ipv6.h which is in turn included indirectly via linux/ip.h.
However, this breaks down if CONFIG_IPV6 is not set leading
to the following build errors:

openvswitch/datapath/linux-2.6/vport-capwap.c: In function ‘capwap_hdr’:
openvswitch/datapath/linux-2.6/vport-capwap.c:61: error: implicit declaration of function ‘udp_hdr’
openvswitch/datapath/linux-2.6/vport-capwap.c: In function ‘capwap_hdr_len’:
openvswitch/datapath/linux-2.6/vport-capwap.c:127: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’ 
openvswitch/datapath/linux-2.6/vport-capwap.c: In function ‘capwap_build_header’:
openvswitch/datapath/linux-2.6/vport-capwap.c:135: warning: initialization makes pointer from integer without a cast
openvswitch/datapath/linux-2.6/vport-capwap.c:138: error: dereferencing pointer to incomplete type
openvswitch/datapath/linux-2.6/vport-capwap.c:139: error: dereferencing pointer to incomplete type
openvswitch/datapath/linux-2.6/vport-capwap.c:140: error: dereferencing pointer to incomplete type
openvswitch/datapath/linux-2.6/vport-capwap.c:141: error: dereferencing pointer to incomplete type
openvswitch/datapath/linux-2.6/vport-capwap.c: In function ‘capwap_rcv’:
openvswitch/datapath/linux-2.6/vport-capwap.c:179: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’ 
openvswitch/datapath/linux-2.6/vport-capwap.c:182: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’ 
openvswitch/datapath/linux-2.6/vport-capwap.c:183: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’ 
openvswitch/datapath/linux-2.6/vport-capwap.c: In function ‘capwap_init’:
openvswitch/datapath/linux-2.6/vport-capwap.c:238: error: implicit declaration of function ‘udp_sk’
openvswitch/datapath/linux-2.6/vport-capwap.c:238: error: invalid type argument of ‘->’ (have ‘int’)
openvswitch/datapath/linux-2.6/vport-capwap.c:239: error: invalid type argument of ‘->’ (have ‘int’)
openvswitch/datapath/linux-2.6/vport-capwap.c: In function ‘fragment’:
openvswitch/datapath/linux-2.6/vport-capwap.c:284: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’ 
openvswitch/datapath/linux-2.6/vport-capwap.c:334: warning: assignment makes pointer from integer without a cast
openvswitch/datapath/linux-2.6/vport-capwap.c:335: error: dereferencing pointer to incomplete type

Signed-off-by: Simon Horman <horms at verge.net.au>

Index: a/datapath/vport-capwap.c
===================================================================
--- a/datapath//vport-capwap.c	2010-08-31 11:33:11.000000000 +0900
+++ a/datapath/vport-capwap.c	2010-08-31 11:33:24.000000000 +0900
@@ -21,6 +21,7 @@
 #include <net/inet_frag.h>
 #include <net/ip.h>
 #include <net/protocol.h>
+#include <net/udp.h>
 
 #include "tunnel.h"
 #include "vport.h"




More information about the dev mailing list