Subject: arm32 -current breaks usr.sbin/mbrlabel
To: None <port-arm32@netbsd.org>
From: Todd Whitesel <toddpw@best.com>
List: port-arm32
Date: 11/18/1998 02:14:20
Building arm32 -current on a CATS machine:

all ===> usr.sbin/mbrlabel 
cc -O  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Werror
-I/usr/src/usr.sbin/mbrlabel/../../sbin/disklabel -c mbrlabel.c
In file included from mbrlabel.c:49:
mbrlabel.h:43: redefinition of `struct mbr_partition'
*** Error code 1

Stop.

Apparently the arm32 /usr/include/machine/disklabel_mbr.h now has a copy of
the MBR stuff in it, and this conflicts with the private copy that mbrlabel
has. For now I have hacked mbrlabel to use 'struct my_mbr_partition' to get
around this. Udiffs attached below...

Todd Whitesel
toddpw @ best.com

Index: /usr/src/usr.sbin/mbrlabel/mbrlabel.h
--- mbrlabel.h.orig	Wed Nov 18 02:04:55 1998
+++ mbrlabel.h	Wed Nov 18 02:05:15 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/src/usr.sbin/mbrlabel/mbrlabel.c
--- mbrlabel.c.orig	Wed Nov 18 02:04:52 1998
+++ mbrlabel.c	Wed Nov 18 02:05:02 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 = (off_t)off * DEV_BSIZE;
 
 	if (lseek(sd, loff, SEEK_SET) != loff) {