From 2183cbe4203baa9866bde803a95210404d75b6ac Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Mon, 11 Jan 2010 16:56:27 +0100 Subject: [PATCH] Fix kernel build without INET6. With the addition of -Werror, some minor issues crept up. The only issue left is that building with 'options SCTP' and without 'options INET6' is broken still (and was before -Werror), since our SCTP code doesn't #ifdef out enough. But as our SCTP support is quite old and has never been updated (and I don't plan to do so), I'll leave it at that. Reported-by: Johannes Hofmann Dragonfly-bug: --- sys/net/faith/if_faith.c | 2 ++ sys/netinet/ip_carp.c | 2 +- sys/netinet/tcp_usrreq.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/net/faith/if_faith.c b/sys/net/faith/if_faith.c index 1fe2f28295..650b844324 100644 --- a/sys/net/faith/if_faith.c +++ b/sys/net/faith/if_faith.c @@ -99,7 +99,9 @@ static int faithioctl (struct ifnet *, u_long, caddr_t, struct ucred *); int faithoutput (struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static void faithrtrequest (int, struct rtentry *, struct rt_addrinfo *); +#ifdef INET6 static int faithprefix (struct in6_addr *); +#endif static int faithmodevent (module_t, int, void *); diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 789110f335..990eae6bf8 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -277,9 +277,9 @@ carp_hmac_prepare(struct carp_softc *sc) { uint8_t version = CARP_VERSION, type = CARP_ADVERTISEMENT; uint8_t vhid = sc->sc_vhid & 0xff; - struct ifaddr_container *ifac; int i; #ifdef INET6 + struct ifaddr_container *ifac; struct in6_addr in6; #endif #ifdef INET diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index efa9360e8d..8c5f54f57e 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -979,6 +979,7 @@ struct netmsg_tcp6_connect { struct mbuf *nm_m; }; +#ifdef INET6 static void tcp6_connect_handler(netmsg_t netmsg) { @@ -989,9 +990,10 @@ tcp6_connect_handler(netmsg_t netmsg) msg->nm_sin6, msg->nm_addr6); lwkt_replymsg(&msg->nm_netmsg.nm_lmsg, error); } - #endif +#endif /* SMP */ + /* * Common subroutine to open a TCP connection to remote host specified * by struct sockaddr_in in mbuf *nam. Call in_pcbbind to assign a local -- 2.11.4.GIT