Subject: kern/3402: compile stops for -Werror w/NTP_SYNC defined
To: None <gnats-bugs@gnats.netbsd.org>
From: None <volker@Illuminatus.MZ.Rhein-Main.DE>
List: netbsd-bugs
Date: 03/28/1997 14:24:59
>Number:         3402
>Category:       kern
>Synopsis:       compile stops for -Werror w/NTP_SYNC defined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 28 06:50:01 1997
>Last-Modified:
>Originator:     Volker Schmidt
>Organization:
Volker Schmidt                          volker@illuminatus.mz.rhein-main.de

PGP public key available on request.
>Release:        <NetBSD-current Mar 27, 1997
>Environment:
System: NetBSD testbed 1.2D NetBSD 1.2D (TESTBED) #0: Thu Mar 27 21:28:18 CET 1997 root@testbed:/usr/src/current/src/sys/arch/i386/compile/TESTBED i386


>Description:
Kernel compile fails due to -Werror when defining "option NTP_SYNC" in config file

cc  -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -I. -I../../../../arch -I../../../.. -nostdinc -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DEXEC_AOUT -DEXEC_SCRIPT -DI486_CPU -DDUMMY_NOPS -DXSERVER -DUCONSOLE -DINSECURE -DRTC_OFFSET="0xffffffc4" -DNTP -DPPS_SYNC -DDDB -DDIAGNOSTIC -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DCOMPAT_NOMID -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_11 -DCOMPAT_43 -DTCP_COMPAT_42 -DUSER_LDT -DLKM -DFFS -DMFS -DNFS -DCD9660 -DMSDOSFS -DFDESC -DKERNFS -DNULLFS -DPROCFS -DQUOTA -DNFSSERVER -DINET -DEISAVERBOSE -DPCIVERBOSE -DMAXUSERS=32 -D_KERNEL  -Di386  -c ../../../../kern/kern_clock.c
cc1: warnings being treated as errors
../../../../kern/kern_clock.c:1087: warning: function declaration isn't a prototype
*** Error code 1

Stop.

>How-To-Repeat:
	Define NTP_SYNC in config file.
>Fix:
Also needed in sys/sys/systm.h

[volker][108] [~] > diff -u /usr/include/sys/systm.h.SAVE /usr/include/sys/systm.h
--- /usr/include/sys/systm.h.SAVE       Fri Jan 31 13:23:22 1997
+++ /usr/include/sys/systm.h    Wed Mar 26 09:51:28 1997
@@ -224,6 +224,9 @@
 #ifdef NTP
 void   hardupdate __P((long offset));
 #endif
+#ifdef PPS_SYNC
+void   hardpps __P((struct timeval *tvp, long usec));
+#endif

 void   initclocks __P((void));
 void   inittodr __P((time_t));

>Audit-Trail:
>Unformatted: