Subject: port-hp300/235: compilation problem on hp300; hpux_compat error
To: None <gnats-admin>
From: None <brezak@apollo.hp.com>
List: netbsd-bugs
Date: 04/25/1994 13:50:06
>Number:         235
>Category:       port-hp300
>Synopsis:       A few things in sys/arch/hp300/hpux/hpux_compat.c need tweeks for new timeval struct
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 25 13:50:04 1994
>Originator:     John Brezak
>Organization:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 John Brezak                    UUCP:     uunet!apollo.hp!brezak
 Hewlett Packard/Apollo         Internet: brezak@ch.hp.com
 300 Apollo Drive               Phone:    (508) 436-4915
 Chelmsford, Massachusetts      Fax:      (508) 436-5122

>Release:        current 4/24
>Environment:
	
System: NetBSD hook.ch.apollo.hp.com 0.9a HOOK#9 hp300


>Description:
	hpux_compat.c will no longer compile due to the introduction of
	nano second resolution timevals.
>How-To-Repeat:
>Fix:

*** hpux_compat.c.orig  Mon Apr 25 16:16:36 1994
--- hpux_compat.c       Mon Apr 25 16:19:17 1994
***************
*** 1586,1595 ****
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = uap->fname;
        vattr_null(&vattr);
!       vattr.va_atime.tv_sec = tv[0];
!       vattr.va_atime.tv_usec = 0;
!       vattr.va_mtime.tv_sec = tv[1];
!       vattr.va_mtime.tv_usec = 0;
        if (error = namei(ndp, p))
                return (error);
        vp = ndp->ni_vp;
--- 1586,1595 ----
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = uap->fname;
        vattr_null(&vattr);
!       vattr.va_atime.ts_sec = tv[0];
!       vattr.va_atime.ts_nsec = 0;
!       vattr.va_mtime.ts_sec = tv[1];
!       vattr.va_mtime.ts_nsec = 0;
        if (error = namei(ndp, p))
                return (error);
        vp = ndp->ni_vp;
***************
*** 1685,1693 ****
        ds.ohst_gid = (short)vattr.va_gid;
        ds.ohst_rdev = (dev_t)vattr.va_rdev;
        ds.ohst_size = (int)vattr.va_size;
!       ds.ohst_atime = (int)vattr.va_atime.tv_sec;
!       ds.ohst_mtime = (int)vattr.va_mtime.tv_sec;
!       ds.ohst_ctime = (int)vattr.va_ctime.tv_sec;
        return (copyout((caddr_t)&ds, (caddr_t)ub, sizeof(ds)));
  }
  /* #endif */
--- 1685,1693 ----
        ds.ohst_gid = (short)vattr.va_gid;
        ds.ohst_rdev = (dev_t)vattr.va_rdev;
        ds.ohst_size = (int)vattr.va_size;
!       ds.ohst_atime = (int)vattr.va_atime.ts_sec;
!       ds.ohst_mtime = (int)vattr.va_mtime.ts_sec;
!       ds.ohst_ctime = (int)vattr.va_ctime.ts_sec;
        return (copyout((caddr_t)&ds, (caddr_t)ub, sizeof(ds)));
  }
  /* #endif */

>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------