From e722d6f29ace12f4b345550247e377d448ca3c5e Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Tue, 5 Aug 2014 13:01:21 +0000 Subject: [PATCH] Honour WITH and WITHOUT_INET6_SUPPORT. Approved by: glebius (mentor) MFC after: 3 days --- sbin/ipf/Makefile.inc | 8 ++++++++ sys/contrib/ipfilter/netinet/ip_compat.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/sbin/ipf/Makefile.inc b/sbin/ipf/Makefile.inc index b3efd6f8eec9..2d7d7b1c71bf 100644 --- a/sbin/ipf/Makefile.inc +++ b/sbin/ipf/Makefile.inc @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + WARNS?= 2 NO_WFORMAT= NO_WARRAY_BOUNDS= @@ -10,6 +12,12 @@ CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../sys/contrib/ipfilter CFLAGS+= -DSTATETOP -D__UIO_EXPOSE +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DUSE_INET6 +.else +CFLAGS+= -DNOINET6 +.endif + LIBIPF= ${.OBJDIR}/../libipf/libipf.a DPADD+= ${LIBIPF} ${LIBKVM} LDADD+= ${LIBIPF} -lkvm diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index e88ef88a6a40..6d744683d467 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -118,6 +118,10 @@ struct ether_addr { # if defined(INET6) && !defined(USE_INET6) # define USE_INET6 # endif +# else +# if !defined(USE_INET6) && !defined(NOINET6) +# define USE_INET6 +# endif # endif # if defined(_KERNEL)