Subject: Re: kernfs_vnops.c May 7 mod breaks vax
To: None <tech-kern@netbsd.org>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: port-vax
Date: 05/13/2004 11:25:50
Hi Christian,

The patch worked here as well.  port-vax builds completely again.

Thanks and regards,
-scott

> Hi,
> 
> On Thu, May 13, 2004 at 03:11:41PM +0000, Christos Zoulas wrote:
> > In article <200405131356.i4DDu4cM020157@mrynet.com>,
> > sgimips NetBSD list <sgimips@mrynet.com> wrote:
> > >All, 
> > >
> > >While cross-building NetBSD-vax under FreeBSD, the below error occurs.
> > >I tracked this back to the mod bringing src/sys/miscfs/kernfs/kernfs_vnops.c
> > >to version 1.102 on May 7 by cl@netbsd.org.  This mod introduces the
> > >particular lines to the file.
> > >
> > >It should be noted that the error does not occur building the alpha, amd64, 
> > >hp300, sparc, sparc64 or sgimips ports.
> > 
> > This is because it uses struct/union initialization syntax that 2.95
> > does not understand.
> 
> It compiles with the attaches patch.  Should I commit this and document it
> in doc/HACKS until vax is switched to a more recent gcc?  Or does anybody
> have a better solution?
> 
>     christian
> 
> 
> --kORqDWCi7qDJ0mEj
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename="kernfs-vax.diff"
> 
> Index: sys/miscfs/kernfs/kernfs_vnops.c
> ===================================================================
> RCS file: /cvsroot/src/sys/miscfs/kernfs/kernfs_vnops.c,v
> retrieving revision 1.103
> diff -p -u -r1.103 kernfs_vnops.c
> --- sys/miscfs/kernfs/kernfs_vnops.c	12 May 2004 02:07:37 -0000	1.103
> +++ sys/miscfs/kernfs/kernfs_vnops.c	13 May 2004 15:14:41 -0000
> @@ -162,11 +162,11 @@ const struct kernfs_fileop kernfs_defaul
>    { .kf_fileop = KERNFS_XWRITE },
>    { .kf_fileop = KERNFS_FILEOP_OPEN },
>    { .kf_fileop = KERNFS_FILEOP_GETATTR,
> -    .kf_vop = kernfs_default_fileop_getattr },
> +    .kf_genop = {kernfs_default_fileop_getattr} },
>    { .kf_fileop = KERNFS_FILEOP_IOCTL },
>    { .kf_fileop = KERNFS_FILEOP_MMAP },
>    { .kf_fileop = KERNFS_FILEOP_CLOSE },
> -  { .kf_fileop = KERNFS_FILEOP_WRITE, .kf_vop = kernfs_default_xwrite },
> +  { .kf_fileop = KERNFS_FILEOP_WRITE, .kf_genop = {kernfs_default_xwrite} },
>  };
>  
>  int	kernfs_lookup	__P((void *));
> 
> --kORqDWCi7qDJ0mEj--
>