diff options
-rw-r--r-- | sys/netinet/icmp6.h | 2 | ||||
-rw-r--r-- | sys/netinet/in.h | 2 | ||||
-rw-r--r-- | sys/netinet/ip6.h | 2 | ||||
-rw-r--r-- | sys/netinet6/icmp6.h | 4 | ||||
-rw-r--r-- | sys/netinet6/in6.h | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6.h | 6 | ||||
-rw-r--r-- | usr.sbin/rtadvd/config.c | 4 |
7 files changed, 22 insertions, 2 deletions
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 6d418d6..7a3dbbd 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -32,6 +32,8 @@ #ifndef _NETINET_ICMP6_H_ #define _NETINET_ICMP6_H_ +#define __KAME_NETINET_ICMP6_H_INCLUDED_ #include <netinet6/icmp6.h> +#undef __KAME_NETINET_ICMP6_H_INCLUDED_ #endif /* !_NETINET_ICMP6_H_ */ diff --git a/sys/netinet/in.h b/sys/netinet/in.h index b18be00..adb9524 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -442,7 +442,9 @@ struct ip_mreq { } /* INET6 stuff */ +#define __KAME_NETINET_IN_H_INCLUDED_ #include <netinet6/in6.h> +#undef __KAME_NETINET_IN_H_INCLUDED_ #ifdef _KERNEL struct ifnet; struct mbuf; /* forward declarations for Standard C */ diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index a0fe4c1..2c0297f 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -29,4 +29,6 @@ * $FreeBSD$ */ +#define __KAME_NETINET_IP6_H_INCLUDED_ #include <netinet6/ip6.h> +#undef __KAME_NETINET_IP6_H_INCLUDED_ diff --git a/sys/netinet6/icmp6.h b/sys/netinet6/icmp6.h index c67e961..feb664e 100644 --- a/sys/netinet6/icmp6.h +++ b/sys/netinet6/icmp6.h @@ -67,6 +67,10 @@ #ifndef _NETINET6_ICMPV6_H_ #define _NETINET6_ICMPV6_H_ +#if !defined(_KERNEL) && !defined(__KAME_NETINET_ICMP6_H_INCLUDED_) +#error "do not include netinet6/icmp6.h directly, include netinet/icmp6.h" +#endif + #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct icmp6_hdr) */ diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 7ceaad4..dce0da2 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -66,6 +66,10 @@ #ifndef _NETINET6_IN6_H_ #define _NETINET6_IN6_H_ +#if !defined(_KERNEL) && !defined(__KAME_NETINET_IN_H_INCLUDED_) +#error "do not include netinet6/in6.h directly, include netinet/in.h" +#endif + #if !defined(_XOPEN_SOURCE) #include <sys/queue.h> #endif diff --git a/sys/netinet6/ip6.h b/sys/netinet6/ip6.h index 9ebd51e..9c609e7 100644 --- a/sys/netinet6/ip6.h +++ b/sys/netinet6/ip6.h @@ -67,6 +67,12 @@ #ifndef _NETINET6_IPV6_H_ #define _NETINET6_IPV6_H_ +#if !defined(_KERNEL) && !defined(__KAME_NETINET_IP6_H_INCLUDED_) +#if 0 /* XXX: waiting for contrib/addrtoname.c fix */ +#error "do not include netinet6/ip6.h directly, include netinet/ip6.h" +#endif +#endif + /* * Definition for internet protocol version 6. * RFC 2460 diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index 3055161..0e5f80d 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -41,9 +41,9 @@ #include <netinet/in.h> #include <netinet/in_var.h> -#include <netinet6/ip6.h> +#include <netinet/ip6.h> #include <netinet6/ip6_var.h> -#include <netinet6/icmp6.h> +#include <netinet/icmp6.h> #include <arpa/inet.h> |