Subject: lib/3889: build chokes on libc/gen/sleep.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@tater.mines.edu>
List: netbsd-bugs
Date: 07/19/1997 08:22:51
>Number:         3889
>Category:       lib
>Synopsis:       typo and unused rcsid cause sleep.c compile to fail
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 19 07:35:01 1997
>Last-Modified:
>Originator:     Jim Bernard
>Organization:
	speaking for myself
>Release:        July 19, 1997
>Environment:
System: NetBSD zoo 1.2G NetBSD 1.2G (ZOO) #0: Sat Jul 12 16:26:42 MDT 1997 jim@zoo:/jaz/home/local/compile/sys/arch/i386/compile/ZOO i386


>Description:
cc -O -DNLS -DYP -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -I/jaz/home/local/compile/lib/libc/include -D__DBINTERFACE_PRIVATE -DPOSIX_MISTAKE -DFLOATING_POINT  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -c /jaz/home/local/compile/lib/libc/gen/sleep.c
/jaz/home/local/compile/lib/libc/gen/sleep.c: In function `sleep':
/jaz/home/local/compile/lib/libc/gen/sleep.c:55: `rmt' undeclared (first use this function)
/jaz/home/local/compile/lib/libc/gen/sleep.c:55: (Each undeclared identifier is reported only once
/jaz/home/local/compile/lib/libc/gen/sleep.c:55: for each function it appears in.)
cc1: warnings being treated as errors
/jaz/home/local/compile/lib/libc/gen/sleep.c:50: warning: unused variable `rtm'
/jaz/home/local/compile/lib/libc/gen/sleep.c:58: warning: control reaches end of non-void function
/jaz/home/local/compile/lib/libc/gen/sleep.c: At top level:
/jaz/home/local/compile/lib/libc/gen/sleep.c:40: warning: `rcsid' defined but not used
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

>How-To-Repeat:
	make build
>Fix:
--- sleep.c-dist	Sat Jul 19 05:12:42 1997
+++ sleep.c	Sat Jul 19 08:10:21 1997
@@ -36,8 +36,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: sleep.c,v 1.17 1997/07/19 02:42:31 jtc Exp $";
+__RCSID("$NetBSD: sleep.c,v 1.17 1997/07/19 02:42:31 jtc Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <time.h>
@@ -47,7 +48,7 @@
 sleep(seconds)
 	unsigned int seconds;
 {
-	struct timespec rqt, rtm;
+	struct timespec rqt, rmt;
 
 	rqt.tv_sec  = seconds;
 	rqt.tv_nsec = 0;
>Audit-Trail:
>Unformatted: