Subject: Re: Can't build mbrlabel
To: None <richard.earnshaw@arm.com>
From: Todd Whitesel <toddpw@best.com>
List: port-arm32
Date: 12/20/1998 08:01:56
> This one has been broken for a while now...
> 
> all ===> usr.sbin/mbrlabel
> cc -O  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
> -Werror   -I/work/rearnsha/netbsd/usr.sbin/mbrlabel/../../sbin/disklabel 
> -c /work/rearnsha/netbsd/usr.sbin/mbrlabel/mbrlabel.c
> In file included from /work/rearnsha/netbsd/usr.sbin/mbrlabel/mbrlabel.c:49
> :
> /work/rearnsha/netbsd/usr.sbin/mbrlabel/mbrlabel.h:43: redefinition of 
> `struct mbr_partition'
> *** Error code 1

Cheap kludge:

Index: ./usr.sbin/mbrlabel/mbrlabel.h
--- ./usr.sbin/mbrlabel/mbrlabel.h.orig	Mon Nov 16 10:44:26 1998
+++ ./usr.sbin/mbrlabel/mbrlabel.h	Fri Dec 11 14:49:55 1998
@@ -40,7 +40,7 @@
 #define	MBRPARTOFF	446
 #define	NMBRPART	4
 
-struct mbr_partition {
+struct my_mbr_partition {
 	unsigned char	mp_flag;	/* bootstrap flags */
 	unsigned char	mp_shd;		/* starting head */
 	unsigned char	mp_ssect;	/* starting sector */
Index: ./usr.sbin/mbrlabel/mbrlabel.c
--- ./usr.sbin/mbrlabel/mbrlabel.c.orig	Thu Dec  3 04:20:48 1998
+++ ./usr.sbin/mbrlabel/mbrlabel.c	Fri Dec 11 14:49:55 1998
@@ -138,7 +138,7 @@
 	u_int32_t off;
 {
 	unsigned char buf[DEV_BSIZE];
-	struct mbr_partition *mpart, *epart;
+	struct my_mbr_partition *mpart, *epart;
 	off_t loff = 0;	/* XXX this nonsense shuts up GCC 2.7.2.2 */
 
 	loff = (off_t)off * DEV_BSIZE;
# eop

Todd Whitesel
toddpw @ best.com