Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2012 02:16:31 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230443 - in head/sys: modules modules/ipdivert netinet
Message-ID:  <201201220216.q0M2GVwT019408@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sun Jan 22 02:16:31 2012
New Revision: 230443
URL: http://svn.freebsd.org/changeset/base/230443

Log:
  Fix ip_divert handling of inet and inet6 and module building some more.
  
  Properly sort the "carp" case in modules/Makefile after it was renamed.
  
  Reported by:	bde (most)
  Reviewed by:	bde
  MFC after:	3 days

Modified:
  head/sys/modules/Makefile
  head/sys/modules/ipdivert/Makefile
  head/sys/netinet/ip_divert.c

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Sun Jan 22 02:13:19 2012	(r230442)
+++ head/sys/modules/Makefile	Sun Jan 22 02:16:31 2012	(r230443)
@@ -136,7 +136,7 @@ SUBDIR=	${_3dfx} \
 	${_igb} \
 	${_iir} \
 	${_io} \
-	ipdivert \
+	${_ipdivert} \
 	${_ipfilter} \
 	${_ipfw} \
 	ipfw_nat \
@@ -370,20 +370,21 @@ _random=	random
 .endif
 .endif
 
-.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
-_if_gre=	if_gre
-.endif
-
 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
 	defined(ALL_MODULES)
 _carp=	carp
 .endif
 
+.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
+_if_gre=	if_gre
+.endif
+
 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
 _ipfilter=	ipfilter
 .endif
 
 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
+_ipdivert=	ipdivert
 _ipfw=		ipfw
 .endif
 

Modified: head/sys/modules/ipdivert/Makefile
==============================================================================
--- head/sys/modules/ipdivert/Makefile	Sun Jan 22 02:13:19 2012	(r230442)
+++ head/sys/modules/ipdivert/Makefile	Sun Jan 22 02:16:31 2012	(r230443)
@@ -1,13 +1,21 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 .PATH: ${.CURDIR}/../../netinet
 
 KMOD=   ipdivert
-SRCS=   ip_divert.c opt_inet6.h
+SRCS=   ip_divert.c opt_inet.h opt_inet6.h
 
 .if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
+opt_inet.h:
+	echo "#define INET 1" > ${.TARGET}
+.endif
+.if ${MK_INET6_SUPPORT} != "no"
 opt_inet6.h:
 	echo "#define INET6 1" > ${.TARGET}
 .endif
+.endif
 
 .include <bsd.kmod.mk>

Modified: head/sys/netinet/ip_divert.c
==============================================================================
--- head/sys/netinet/ip_divert.c	Sun Jan 22 02:13:19 2012	(r230442)
+++ head/sys/netinet/ip_divert.c	Sun Jan 22 02:16:31 2012	(r230443)
@@ -30,14 +30,12 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#if !defined(KLD_MODULE)
 #include "opt_inet.h"
+#include "opt_inet6.h"
 #include "opt_sctp.h"
 #ifndef INET
 #error "IPDIVERT requires INET."
 #endif
-#endif
-#include "opt_inet6.h"
 
 #include <sys/param.h>
 #include <sys/kernel.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201220216.q0M2GVwT019408>