svn commit: r274289 - in head/sys: modules/if_gre net
Gleb Smirnoff
glebius at FreeBSD.org
Sat Nov 8 16:04:26 UTC 2014
On Sat, Nov 08, 2014 at 02:41:33PM +0000, Bjoern A. Zeeb wrote:
B> Author: bz
B> Date: Sat Nov 8 14:41:32 2014
B> New Revision: 274289
B> URL: https://svnweb.freebsd.org/changeset/base/274289
B>
B> Log:
B> After r274246 make the tree compile again.
B>
B> gcc requires variables to be initialised in two places. One of them
B> is correctly used only under the same conditional though.
B>
B> For module builds properly check if the kernel supports INET or INET6,
B> as otherwise various mips kernels without IPv6 support would fail to build.
B>
B> Modified:
B> head/sys/modules/if_gre/Makefile
B> head/sys/net/if_gre.c
B>
B> Modified: head/sys/modules/if_gre/Makefile
B> ==============================================================================
B> --- head/sys/modules/if_gre/Makefile Sat Nov 8 13:49:59 2014 (r274288)
B> +++ head/sys/modules/if_gre/Makefile Sat Nov 8 14:41:32 2014 (r274289)
B> @@ -6,10 +6,24 @@
B> KMOD= if_gre
B> SRCS= if_gre.c opt_inet.h opt_inet6.h
B>
B> +.if defined(KERNBUILDDIR)
B> +OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo
B> +.if empty(OPT_INET)
B> +MK_INET_SUPPORT=no
B> +.endif
B> +.endif
B> +
B> .if ${MK_INET_SUPPORT} != "no"
B> SRCS+= ip_gre.c
B> .endif
B>
B> +.if defined(KERNBUILDDIR)
B> +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo
B> +.if empty(OPT_INET6)
B> +MK_INET6_SUPPORT=no
B> +.endif
B> +.endif
B> +
B> .if ${MK_INET6_SUPPORT} != "no"
B> SRCS+= ip6_gre.c
B> .endif
Thanks for the fix. This code looks very much like a dirty workaround, and
we already have it in other modules, e.g. if_gif.
Maybe someone with Make-foo can handle this properly in the build infrastructure.
--
Totus tuus, Glebius.
More information about the svn-src-all
mailing list