Subject: port-i386/1835: Kernel compile dies in machdep.c if HZ is defined (i386)
To: None <gnats-bugs@NetBSD.ORG>
From: Roland C Dowdeswell <>
List: netbsd-bugs
Date: 12/13/1995 15:48:53
>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
>Originator:     Roland C Dowdeswell
The Fall of Imrryr


>Release:        -current
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


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.



options  HZ=80

in your config, and 

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


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
  	register struct timeval *tvp;