Subject: port-sparc/12916: xy.c fails to compile if __HAVE_OLD_DISKLABEL is not defined
To: None <>
From: None <>
List: netbsd-bugs
Date: 05/12/2001 17:02:13
>Number:         12916
>Category:       port-sparc
>Synopsis:       xy.c fails to compile if __HAVE_OLD_DISKLABEL is not defined
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 12 00:31:00 PDT 2001
>Originator:     Brett Lymn (Master of the Siren)
>Release:        NetBSD-1.5.1_BETA2
Brett Lymn
	sparc SS20, NetBSD-1.5.1_BETA
Architecture: sparc
Machine: sparc
	There is a variable used in the xyioctl function that is surrounded
by an #ifdef __HAVE_OLD_DISKLABEL.  If this ifdef is not true then 
an undefined variable error results (lp is no longer defined).  I checked a
rather dated version of the source tree and this bug was there too, I suspect
that a defopt has recently changed and that has brought this bug to light.

	Ensure __HAVE_OLD_DISKLABEL is not defined and compile a kernel.
	Apply this patch to /usr/src/sys/dev/vme/xy.c:

Index: xy.c
RCS file: /cvsroot/syssrc/sys/dev/vme/xy.c,v
retrieving revision
diff -r1.25.2.3 xy.c
>       struct disklabel *lp;
<       struct disklabel newlabel, *lp;
>       struct disklabel newlabel;