Subject: Re: netbsd-1-6 kernel build failure
To: Bryan Vyhmeister <bsd@hub3.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-users
Date: 07/01/2003 22:36:34
On Tue, Jul 01, 2003 at 12:01:39PM -0700, Bryan Vyhmeister wrote:
> I have just cvs'ed to the most current files in the netbsd-1-6 branch. 
> I rebuilt my tools and then used those tools to try and build my custom 
> kernel. When that failed I tried building GENERIC and the same error 
> occurred. Here is the error:
> 
> 
> /usr/cross/bin/i386--netbsdelf-gcc  -ffreestanding  -O2 -Werror -Wall 
> -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
> -Wstrict-prototypes -Wno-uninitialized  -Di386 -I.  -I../../../../arch 
> -I../../../.. -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT   
> -c /usr/src/sys/arch/i386/compile/GENERIC/../../../../netinet/igmp.c
> *** Error code 1
> 
> Stop.
> nbmake: stopped in /usr/src/sys/arch/i386/compile/GENERIC
> 
> 
> The build environment is a NetBSD/i386 1.6.1 system. Any ideas?

This is a bad pullup. A request it pending to correct it; in the meantime,
you can try this patch (which I extracted from the pullup request tracking
system):
Index: igmp.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/igmp.c,v
retrieving revision 1.28.4.1
diff -u -r1.28.4.1 igmp.c
--- igmp.c	2003/06/30 02:16:24	1.28.4.1
+++ igmp.c	2003/06/30 07:33:15
@@ -132,14 +132,17 @@
 rti_delete(ifp)
 	struct ifnet *ifp;
 {
-	struct router_info *rti;
+	struct router_info *rti, *next, **rtip;
 
-	LIST_FOREACH(rti, &rti_head, rti_link) {
+	rtip = &rti_head;
+	for (rti = *rtip; rti != 0; rti = next) {
+		next = rti->rti_next;
 		if (rti->rti_ifp == ifp) {
-			LIST_REMOVE(rti, rti_link);
-			pool_put(&igmp_rti_pool, rti);
+			*rtip = next;
+			free(rti, M_MRTABLE);
 			return;
-		}
+		} else
+			rtip = &rti->rti_next;
 	}
 }

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--