summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-02-12 09:59:48 +0000
committerglebius <glebius@FreeBSD.org>2014-02-12 09:59:48 +0000
commit02cb746956a63297f09cf799fffa2fc95119236b (patch)
tree942bb8147d0bc325ba7cfcd60b4cf1a179d6442b
parent25d59f119cec731ecb10ac4b7e740e2e637dba07 (diff)
downloadFreeBSD-src-02cb746956a63297f09cf799fffa2fc95119236b.zip
FreeBSD-src-02cb746956a63297f09cf799fffa2fc95119236b.tar.gz
Fix world build WITHOUT_PF.
Sponsored by: Nginx, Inc.
-rw-r--r--sbin/ipfw/Makefile10
-rw-r--r--sbin/ipfw/ipfw2.h5
-rw-r--r--usr.bin/kdump/Makefile4
-rw-r--r--usr.bin/kdump/mkioctls6
-rw-r--r--usr.sbin/bsnmpd/modules/Makefile5
5 files changed, 26 insertions, 4 deletions
diff --git a/sbin/ipfw/Makefile b/sbin/ipfw/Makefile
index b25f38c..6aea26b 100644
--- a/sbin/ipfw/Makefile
+++ b/sbin/ipfw/Makefile
@@ -1,8 +1,16 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ipfw
-SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c
+SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c
WARNS?= 2
+
+.if ${MK_PF} != "no"
+SRCS+= altq.c
+CFLAGS+=-DPF
+.endif
+
DPADD= ${LIBUTIL}
LDADD= -lutil
MAN= ipfw.8
diff --git a/sbin/ipfw/ipfw2.h b/sbin/ipfw/ipfw2.h
index 2c70bbd..6e895b8 100644
--- a/sbin/ipfw/ipfw2.h
+++ b/sbin/ipfw/ipfw2.h
@@ -268,11 +268,14 @@ void ipfw_flush(int force);
void ipfw_zero(int ac, char *av[], int optname);
void ipfw_list(int ac, char *av[], int show_counters);
+#ifdef PF
/* altq.c */
void altq_set_enabled(int enabled);
u_int32_t altq_name_to_qid(const char *name);
-
void print_altq_cmd(struct _ipfw_insn_altq *altqptr);
+#else
+#define NO_ALTQ
+#endif
/* dummynet.c */
void dummynet_list(int ac, char *av[], int show_counters);
diff --git a/usr.bin/kdump/Makefile b/usr.bin/kdump/Makefile
index d65779e..f9d56cc 100644
--- a/usr.bin/kdump/Makefile
+++ b/usr.bin/kdump/Makefile
@@ -20,6 +20,10 @@ LDADD+= -lcapsicum -lnv
CFLAGS+=-DHAVE_LIBCAPSICUM
.endif
+.if ${MK_PF} != "no"
+CFLAGS+=-DPF
+.endif
+
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
SRCS+= linux_syscalls.c
.endif
diff --git a/usr.bin/kdump/mkioctls b/usr.bin/kdump/mkioctls
index 0dac684..a9ba860 100644
--- a/usr.bin/kdump/mkioctls
+++ b/usr.bin/kdump/mkioctls
@@ -21,7 +21,8 @@ LC_ALL=C; export LC_ALL
# XXX should we use an ANSI cpp?
ioctl_includes=$(
cd $includedir
- find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \
+ find -H -s * -name '*.h' | \
+ egrep -v '(.*disk.*|net/pfvar|net/if_pfsync)\.h' | \
xargs egrep -l \
'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' |
awk '{printf("#include <%s>\\n", $1)}'
@@ -54,7 +55,10 @@ BEGIN {
print "#include <net/ethernet.h>"
print "#include <net/if.h>"
print "#include <net/if_var.h>"
+ print "#ifdef PF"
print "#include <net/pfvar.h>"
+ print "#include <net/if_pfsync.h>"
+ print "#endif"
print "#include <net/route.h>"
print "#include <netinet/in.h>"
print "#include <netinet/ip_mroute.h>"
diff --git a/usr.sbin/bsnmpd/modules/Makefile b/usr.sbin/bsnmpd/modules/Makefile
index d5706fe..45558b7 100644
--- a/usr.sbin/bsnmpd/modules/Makefile
+++ b/usr.sbin/bsnmpd/modules/Makefile
@@ -13,12 +13,15 @@ SUBDIR= ${_snmp_atm} \
snmp_hast \
snmp_hostres \
snmp_mibII \
- snmp_pf \
snmp_target \
snmp_usm \
snmp_vacm \
snmp_wlan
+.if ${MK_PF} != "no"
+SUBDIR+=snmp_pf
+.endif
+
.if ${MK_NETGRAPH_SUPPORT} != "no"
SUBDIR+=snmp_netgraph
.endif
OpenPOWER on IntegriCloud