From 11ee5ab305a984083b258d3c0f4b3dda6ac22ce1 Mon Sep 17 00:00:00 2001 From: Francois Tigeot Date: Thu, 5 Jan 2012 18:40:50 +0100 Subject: [PATCH] kernel: do not try to always build IPv4-specific code * it fails when no INET support is present * and people may want to start running IPv6-only hosts --- sys/dev/netif/an/if_an.c | 2 ++ sys/net/if_ethersubr.c | 2 ++ sys/net/ppp/if_ppp.c | 7 ++++++- sys/net/tun/if_tun.c | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/dev/netif/an/if_an.c b/sys/dev/netif/an/if_an.c index c1d3942fee..cd053cd1de 100644 --- a/sys/dev/netif/an/if_an.c +++ b/sys/dev/netif/an/if_an.c @@ -2429,8 +2429,10 @@ an_init(void *xsc) } } +#ifdef ANCACHE if (sc->an_have_rssimap) sc->an_config.an_rxmode |= AN_RXMODE_NORMALIZED_RSSI; +#endif /* Set the ssid list */ sc->an_ssidlist.an_type = AN_RID_SSIDLIST; diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index cfc4bcaad8..3a68835153 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -684,7 +684,9 @@ ether_resolvemulti( struct sockaddr *sa) { struct sockaddr_dl *sdl; +#ifdef INET struct sockaddr_in *sin; +#endif #ifdef INET6 struct sockaddr_in6 *sin6; #endif diff --git a/sys/net/ppp/if_ppp.c b/sys/net/ppp/if_ppp.c index 7b1135ecf4..29112c8b89 100644 --- a/sys/net/ppp/if_ppp.c +++ b/sys/net/ppp/if_ppp.c @@ -715,7 +715,9 @@ pppoutput_serialized(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, int protocol, address, control; u_char *cp; int error; +#ifdef INET struct ip *ip; +#endif struct ifqueue *ifq; enum NPmode mode; int len; @@ -1257,11 +1259,14 @@ ppp_inproc(struct ppp_softc *sc, struct mbuf *m) { struct ifnet *ifp = &sc->sc_if; int isr; - int ilen = 0, xlen, proto, rv; + int ilen = 0, proto, rv; u_char *cp, adrs, ctrl; struct mbuf *mp, *dmp = NULL; +#ifdef VJC + int xlen; u_char *iphdr; u_int hlen; +#endif ASSERT_IFNET_SERIALIZED_ALL(ifp); diff --git a/sys/net/tun/if_tun.c b/sys/net/tun/if_tun.c index e0cc1ef31b..84e7ea20aa 100644 --- a/sys/net/tun/if_tun.c +++ b/sys/net/tun/if_tun.c @@ -230,7 +230,9 @@ tunclose(struct dev_close_args *ap) static int tuninit(struct ifnet *ifp) { +#ifdef INET struct tun_softc *tp = ifp->if_softc; +#endif struct ifaddr_container *ifac; int error = 0; -- 2.41.0