Subject: lib/4669: libc compiling failure on port-powerpc
To: None <gnats-bugs@gnats.netbsd.org>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.or.jp>
List: netbsd-bugs
Date: 12/12/1997 02:12:24
>Number:         4669
>Category:       lib
>Synopsis:       libc and libkvm compile fails on port-powerpc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 11 09:35:01 1997
>Last-Modified:
>Originator:     SUNAGAWA Keiki
>Organization:
	individual
>Release:        Dec 12 1997
>Environment:
	Host machine:
	Linux version 2.1.57 (cort@cerebus.cs.nmt.edu) (gcc version 2.7.2.1-ppclinux) #316 Sat Oct 11 14:57:51 MDT 1997

	binutils-2.8.1-powerpc-elf-netbsd
	gcc-2.7.2.3-powerpc-elf-netbsd

	Target machine:
	NetBSD 1.3_BETA (GENERIC) #0: Thu Dec 11 07:46:58 JST 1997
	This source was supped on Dec 04 1997.

>Description:
	When I cross-compiled the library sources under linux/ppc on
	the PowerMac clone, some warnings occured and it failed.

	flt_rounds.c:12: warning: function declaration isn't a prototype

	kvm_powerpc.c:40: vm/vm.h: No such file or directory
	kvm_powerpc.c:44: kvm.h: No such file or directory

>How-To-Repeat:
	See above.
>Fix:
	Apply following diffs.  It adds required includes.

--- ./libc/arch/powerpc/gen/flt_rounds.c.orig	Sun Mar 30 10:42:59 1997
+++ ./libc/arch/powerpc/gen/flt_rounds.c	Fri Dec 12 00:34:45 1997
@@ -1,11 +1,15 @@
 /*	$NetBSD: flt_rounds.c,v 1.1 1997/03/29 20:55:55 thorpej Exp $	*/
 
+#include <sys/types.h>
+
 static const int map[] = {
 	1,	/* round to nearest */
 	0,	/* round to zero */
 	2,	/* round to positive infinity */
 	3	/* round to negative infinity */
 };
+
+int __flt_rounds __P((void));
 
 int
 __flt_rounds()
--- ./libkvm/kvm_powerpc.c.orig	Fri Sep 19 20:13:08 1997
+++ ./libkvm/kvm_powerpc.c	Fri Dec 12 00:39:58 1997
@@ -35,6 +35,7 @@
  * PowerPC machine dependent routines for kvm.
  */
 
+#include <stdlib.h>
 #include <sys/param.h>
 
 #include <vm/vm.h>
>Audit-Trail:
>Unformatted: