Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Nov 2009 12:40:25 -0500
From:      Ben Kelly <ben@wanderview.com>
To:        current@freebsd.org
Subject:   ifmcstat fails to build without KVM and with INET6
Message-ID:  <92BA99AC-E038-44F4-A443-91FF5AA2968F@wanderview.com>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-152--382848992
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii;
	format=flowed;
	delsp=yes

Hello all,

I'm having difficulty compiling a freshly updated checkout of head  
using WITHOUT_KVM src.conf.  The error is in src/usr.sbin/ifmcstat/ 
ifmcstat.c.  It appears the problem is due to the in6_ifinfo()  
function definition being incorrectly under an #ifdef WITH_KVM  
section.  I was able to fix the problem with the attached patch.

Just FYI in case anyone else hits this problem.

- Ben


--Apple-Mail-152--382848992
Content-Disposition: attachment;
	filename=ifmcstat.patch
Content-Type: application/octet-stream;
	name="ifmcstat.patch"
Content-Transfer-Encoding: 7bit

Index: usr.sbin/ifmcstat/ifmcstat.c
===================================================================
--- usr.sbin/ifmcstat/ifmcstat.c	(revision 242)
+++ usr.sbin/ifmcstat/ifmcstat.c	(working copy)
@@ -442,32 +442,6 @@
 #ifdef INET6
 
 static void
-in6_ifinfo(struct mld_ifinfo *mli)
-{
-
-	printf("\t");
-	switch (mli->mli_version) {
-	case MLD_VERSION_1:
-	case MLD_VERSION_2:
-		printf("mldv%d", mli->mli_version);
-		break;
-	default:
-		printf("mldv?(%d)", mli->mli_version);
-		break;
-	}
-	printb(" flags", mli->mli_flags, "\020\1SILENT");
-	if (mli->mli_version == MLD_VERSION_2) {
-		printf(" rv %u qi %u qri %u uri %u",
-		    mli->mli_rv, mli->mli_qi, mli->mli_qri, mli->mli_uri);
-	}
-	if (vflag >= 2) {
-		printf(" v1timer %u v2timer %u", mli->mli_v1_timer,
-		   mli->mli_v2_timer);
-	}
-	printf("\n");
-}
-
-static void
 if6_addrlist(struct ifaddr *ifap)
 {
 	struct ifnet ifnet;
@@ -764,6 +738,33 @@
 #endif /* WITH_KVM */
 
 #ifdef INET6
+
+static void
+in6_ifinfo(struct mld_ifinfo *mli)
+{
+
+	printf("\t");
+	switch (mli->mli_version) {
+	case MLD_VERSION_1:
+	case MLD_VERSION_2:
+		printf("mldv%d", mli->mli_version);
+		break;
+	default:
+		printf("mldv?(%d)", mli->mli_version);
+		break;
+	}
+	printb(" flags", mli->mli_flags, "\020\1SILENT");
+	if (mli->mli_version == MLD_VERSION_2) {
+		printf(" rv %u qi %u qri %u uri %u",
+		    mli->mli_rv, mli->mli_qi, mli->mli_qri, mli->mli_uri);
+	}
+	if (vflag >= 2) {
+		printf(" v1timer %u v2timer %u", mli->mli_v1_timer,
+		   mli->mli_v2_timer);
+	}
+	printf("\n");
+}
+
 static const char *
 inet6_n2a(struct in6_addr *p)
 {

--Apple-Mail-152--382848992--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?92BA99AC-E038-44F4-A443-91FF5AA2968F>