aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2015-07-30 10:26:43 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2015-07-30 10:26:43 +0000
commita5965d1513c55154c0d02ab3ff720af962bd5ae5 (patch)
treef69bb798edd07413831826b80df2a32b02ec9f47
parenta86e343db61f1af0b001f7d4766debd7fb14e581 (diff)
downloadsrc-a5965d1513c55154c0d02ab3ff720af962bd5ae5.tar.gz
src-a5965d1513c55154c0d02ab3ff720af962bd5ae5.zip
Build if_stf(4) module only when both INET and INET6 support are enabled.
Notes
Notes: svn path=/head/; revision=286069
-rw-r--r--sys/modules/Makefile7
-rw-r--r--sys/modules/if_stf/Makefile2
-rw-r--r--sys/net/if_stf.c3
3 files changed, 7 insertions, 5 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 508488414136..7b0e286c9fea 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -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
diff --git a/sys/modules/if_stf/Makefile b/sys/modules/if_stf/Makefile
index 709c2555132b..4eb2f01df560 100644
--- a/sys/modules/if_stf/Makefile
+++ b/sys/modules/if_stf/Makefile
@@ -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>
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index 23905783d0db..6d7eeb8e33de 100644
--- a/sys/net/if_stf.c
+++ b/sys/net/if_stf.c
@@ -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>