summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-11-29 17:56:11 +0000
committerume <ume@FreeBSD.org>2005-11-29 17:56:11 +0000
commitaea275fca96384ee1e8df4508f5b030e56b75871 (patch)
tree8ae27279274281f9259e41a2310d66c79daddde6
parentf08da93e6a9a4d02628c965d5622705935e7468a (diff)
downloadFreeBSD-src-aea275fca96384ee1e8df4508f5b030e56b75871.zip
FreeBSD-src-aea275fca96384ee1e8df4508f5b030e56b75871.tar.gz
obey opt_inet6.h and opt_ipsec.h in kernel build directory.
Requested by: hrs
-rw-r--r--sys/modules/ipfw/Makefile14
-rw-r--r--sys/netinet/ip_fw2.c4
-rw-r--r--sys/netinet/ip_fw_pfil.c2
3 files changed, 17 insertions, 3 deletions
diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile
index cd5a6f7..c8c82cc 100644
--- a/sys/modules/ipfw/Makefile
+++ b/sys/modules/ipfw/Makefile
@@ -4,6 +4,7 @@
KMOD= ipfw
SRCS= ip_fw2.c ip_fw_pfil.c
+SRCS+= opt_inet6.h opt_ipsec.h
CFLAGS+= -DIPFIREWALL
#
@@ -15,4 +16,17 @@ CFLAGS+= -DIPFIREWALL
#CFLAGS+= -DIPFIREWALL_DEFAULT_TO_ACCEPT
#
+.if !defined(KERNBUILDDIR)
+.if defined(NO_INET6)
+opt_inet6.h:
+ cat /dev/null > ${.TARGET}
+.else
+opt_inet6.h:
+ echo "#define INET6 1" > ${.TARGET}
+.endif
+
+opt_ipsec.h:
+ cat /dev/null > ${.TARGET}
+.endif
+
.include <bsd.kmod.mk>
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index f2c6504..f42ca38 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -37,12 +37,12 @@
#include "opt_ip6fw.h"
#include "opt_ipdn.h"
#include "opt_inet.h"
-#include "opt_inet6.h"
-#include "opt_ipsec.h"
#ifndef INET
#error IPFIREWALL requires INET.
#endif /* INET */
#endif
+#include "opt_inet6.h"
+#include "opt_ipsec.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/netinet/ip_fw_pfil.c b/sys/netinet/ip_fw_pfil.c
index ab1ff55..65fbf82 100644
--- a/sys/netinet/ip_fw_pfil.c
+++ b/sys/netinet/ip_fw_pfil.c
@@ -30,11 +30,11 @@
#include "opt_ipfw.h"
#include "opt_ipdn.h"
#include "opt_inet.h"
-#include "opt_inet6.h"
#ifndef INET
#error IPFIREWALL requires INET.
#endif /* INET */
#endif /* KLD_MODULE */
+#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/systm.h>
OpenPOWER on IntegriCloud