Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA24429; Wed, 13 Dec 95 17:44:11 EST
Received: from pain.lcs.mit.edu by MIT.EDU with SMTP
	id AA19602; Wed, 13 Dec 95 17:44:05 EST
Received: (from daemon@localhost) by pain.lcs.mit.edu (8.6.12/8.6.9) id PAA12361; Wed, 13 Dec 1995 15:50:10 -0500
Received: (from gnats@localhost) by pain.lcs.mit.edu (8.6.12/8.6.9) id PAA12352; Wed, 13 Dec 1995 15:50:03 -0500
Resent-Date: Wed, 13 Dec 1995 15:50:03 -0500
Resent-Message-Id: <199512132050.PAA12352@pain.lcs.mit.edu>
Resent-From: gnats@NetBSD.ORG (GNATS Management)
Resent-To: gnats-admin@pain.lcs.mit.edu
Resent-Cc: gnats-admin@pain.lcs.mit.edu, netbsd-bugs@NetBSD.ORG
Resent-Reply-To: gnats-bugs@NetBSD.ORG, roland@imrryr.org
Received: from arioch.imrryr.org by pain.lcs.mit.edu (8.6.12/8.6.9) with ESMTP id PAA12296 for <gnats-bugs@NetBSD.ORG>; Wed, 13 Dec 1995 15:48:20 -0500
Received: (from roland@localhost) by arioch.imrryr.org (8.6.12/8.6.9) id PAA02505; Wed, 13 Dec 1995 15:48:53 -0500
Message-Id: <199512132048.PAA02505@arioch.imrryr.org>
Date: Wed, 13 Dec 1995 15:48:53 -0500
From: Roland C Dowdeswell <roland@imrryr.org>
Reply-To: roland@imrryr.org
To: gnats-bugs@NetBSD.ORG
X-Send-Pr-Version: 3.2
Subject: port-i386/1835: Kernel compile dies in machdep.c if HZ is defined (i386)
Sender: owner-netbsd-bugs@NetBSD.ORG
Precedence: list
X-Loop: netbsd-bugs@NetBSD.ORG


>Number:         1835
>Category:       port-i386
>Synopsis:       Kernel compile dies in machdep.c if HZ is defined (i386)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 13 15:50:02 1995
>Last-Modified:
>Originator:     Roland C Dowdeswell
>Organization:
The Fall of Imrryr

later
roland
======
http://www.imrryr.org/

>Release:        -current
>Environment:
	
System: NetBSD arioch 1.1_ALPHA NetBSD 1.1_ALPHA (ARIOCH) #0: Wed Dec 13 03:23:51 EST 1995 roland@arioch:/usr/src/sys/arch/i386/compile/ARIOCH i386


>Description:

For the i386 port, I could not compile a kernel with HZ defined.
(I am not sure if one is supposed to, but I wanted /kern/hz to be
the speed of my processor, not 100.)

The problem is that microtime() is defined in sys/time.h to be of
type void, and in arch/i386/i386/machdep.c, if HZ is defined,
microtime() does not have a type and therefore defaults to int.

>How-To-Repeat:

Put:

options  HZ=80

in your config, and 

$ config ./ARIOCH; cd ../compile/ARIOCH; make depend && make

>Fix:

Add a void in front of microtime.

*** machdep.c.orig	Wed Dec 13 15:40:25 1995
--- machdep.c	Wed Dec 13 15:40:52 1995
***************
*** 890,895 ****
--- 890,896 ----
   * /sys/i386/i386/microtime.s is used.  The other code only works
   * for HZ=100.
   */
+ void
  microtime(tvp)
  	register struct timeval *tvp;
  {
>Audit-Trail:
>Unformatted:
