On Wed, Dec 2, 2015 at 4:12 PM, Kevin Lo <ke...@freebsd.org> wrote: > On Wed, Dec 02, 2015 at 03:47:57PM +0900, Takashi Yamamoto wrote: >> >> On Wed, Dec 2, 2015 at 3:21 PM, Kevin Lo <ke...@freebsd.org> wrote: >> > Hi, >> > >> > Missing a include file caused compile error: >> > http://dpaste.com/22E4MHK >> >> why to add it to lib/util.h, rather than ovs-router.c? > > Because the declarations for ovs_router_lookup() and ovs_router_insert() are > in ovs-router.h, adding netinet/in.h to ovs-router.c won't help. > please see the log, thanks.
well, i can understand if it's ovs-router.h. (although a forward decl seems enough there.) my question is why lib/util.h. > >> > FreeBSD (and NetBSD?) needs to include netinet/in.h to define >> > struct in6_addr. >> > >> > Signed-off-by: Kevin Lo <ke...@freebsd.org> >> > --- >> > >> > diff --git a/lib/util.h b/lib/util.h >> > index 340ef65..9db65c5 100644 >> > --- a/lib/util.h >> > +++ b/lib/util.h >> > @@ -20,6 +20,7 @@ >> > #include <arpa/inet.h> >> > #include <inttypes.h> >> > #include <limits.h> >> > +#include <netinet/in.h> >> > #include <stdarg.h> >> > #include <stdbool.h> >> > #include <stddef.h> >> _______________________________________________ >> dev mailing list >> dev@openvswitch.org >> http://openvswitch.org/mailman/listinfo/dev >> >> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev