Subject: port-mac68k/6846: mac68k kernel fails to build
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wormey@eskimo.com>
List: netbsd-bugs
Date: 01/18/1999 20:44:36
>Number:         6846
>Category:       port-mac68k
>Synopsis:       mac68k kernel won't build
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-mac68k-maintainer (NetBSD/mac68k Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 18 20:50:01 1999
>Last-Modified:
>Originator:     Admin
>Organization:
I speak only for myself.
>Release:        NetBSD-current 19990118
>Environment:
	
System: NetBSD c610 1.3I NetBSD 1.3I (GENERIC) #91: Fri Dec 11 23:20:48 PST 1998 root2@c610:/usr/src/sys/arch/mac68k/compile/GENERIC mac68k


>Description:

Kernel build fails in mac68k/disksubr.c

>How-To-Repeat:
<6 c610 /compile/GENERIC># make
making sure the 68040 FPSP is up to date...
`fpsp.o' is up to date.
cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-main -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DM68040 -DM68030 -DM68020 -DFPSP -DFPU_EMULATE -DLKM -DDIAGNOSTIC -DNS -DMAXUSERS=16 -D_KERNEL -Dmac68k  -c ../../../../arch/mac68k/mac68k/disksubr.c
cc1: warnings being treated as errors
../../../../arch/mac68k/mac68k/disksubr.c: In function `read_dos_label':
../../../../arch/mac68k/mac68k/disksubr.c:518: warning: implicit declaration of function `bswap32'
*** Error code 1

Stop.

>Fix:

Dunno if this is TRT, but it builds:

>Audit-Trail:
>Unformatted:
># diff -c disksubr.c.orig disksubr.c
*** disksubr.c.orig     Mon Jan 18 19:19:14 1999
--- disksubr.c  Mon Jan 18 19:20:35 1999
***************
*** 84,89 ****
--- 84,90 ----
  #include <sys/disk.h>
  #include <sys/disklabel.h>
  #include <sys/syslog.h>
+ #include <machine/bswap.h>
  
  #define       b_cylin b_resid