Author: ae
Date: Thu Jul 30 10:26:43 2015
New Revision: 286069
URL: https://svnweb.freebsd.org/changeset/base/286069

Log:
  Build if_stf(4) module only when both INET and INET6 support are enabled.

Modified:
  head/sys/modules/Makefile
  head/sys/modules/if_stf/Makefile
  head/sys/net/if_stf.c

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile   Thu Jul 30 10:09:31 2015        (r286068)
+++ head/sys/modules/Makefile   Thu Jul 30 10:26:43 2015        (r286069)
@@ -149,7 +149,7 @@ SUBDIR=     \
        ${_if_me} \
        if_lagg \
        ${_if_ndis} \
-       if_stf \
+       ${_if_stf} \
        if_tap \
        if_tun \
        if_vlan \
@@ -411,6 +411,11 @@ _if_gif=   if_gif
 _if_gre=       if_gre
 .endif
 
+.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
+       defined(ALL_MODULES)
+_if_stf=       if_stf
+.endif
+
 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
 _if_me=                if_me
 _ipdivert=     ipdivert

Modified: head/sys/modules/if_stf/Makefile
==============================================================================
--- head/sys/modules/if_stf/Makefile    Thu Jul 30 10:09:31 2015        
(r286068)
+++ head/sys/modules/if_stf/Makefile    Thu Jul 30 10:26:43 2015        
(r286069)
@@ -3,6 +3,6 @@
 .PATH: ${.CURDIR}/../../net
 
 KMOD=  if_stf
-SRCS=  if_stf.c opt_inet.h opt_inet6.h
+SRCS=  if_stf.c
 
 .include <bsd.kmod.mk>

Modified: head/sys/net/if_stf.c
==============================================================================
--- head/sys/net/if_stf.c       Thu Jul 30 10:09:31 2015        (r286068)
+++ head/sys/net/if_stf.c       Thu Jul 30 10:26:43 2015        (r286069)
@@ -74,9 +74,6 @@
  * Note that there is no way to be 100% secure.
  */
 
-#include "opt_inet.h"
-#include "opt_inet6.h"
-
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/socket.h>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to