> On Nov 10, 2020, at 5:49 PM, Brad Spencer <[email protected]> wrote:
> 
> --- sys/net/if_wg.c.DIST      2020-10-26 10:36:30.391354264 -0400
> +++ sys/net/if_wg.c   2020-10-30 19:13:46.910323221 -0400
> @@ -98,8 +98,8 @@
> #include <netinet/udp.h>
> #include <netinet/udp_var.h>
> 
> -#ifdef INET6
> #include <netinet/ip6.h>
> +#ifdef INET6
> #include <netinet6/in6_pcb.h>
> #include <netinet6/in6_var.h>
> #include <netinet6/ip6_var.h>
> @@ -1611,7 +1611,16 @@
> wg_get_so_by_af(struct wg_softc *wg, const int af)
> {
> 
> +#if defined(INET) && defined(INET6)
>       return (af == AF_INET) ? wg->wg_so4 : wg->wg_so6;
> +#else
> +#ifdef INET
> +     return wg->wg_so4;
> +#endif
> +#ifdef INET6
> +     return wg->wg_so6;
> +#endif
> +#endif
> }

Seems ... not great to put #ifdefs like this in something that can be build as 
a module?

-- thorpej

Reply via email to