Subject: port-i386/12886: 1.5.1/i386 kernel does not build without wscons
To: None <gnats-bugs@gnats.netbsd.org>
From: None <urban@boquist.net>
List: netbsd-bugs
Date: 05/09/2001 22:53:24
>Number:         12886
>Category:       port-i386
>Synopsis:       1.5.1/i386 kernel does not build without wscons
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 09 13:57:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Urban Boquist
>Release:        NetBSD-1.5.1-soon-to-be
>Organization:
Carlstedt Research & Technology AB, Sweden
>Environment:
System: NetBSD lan-gw 1.5 NetBSD 1.5 (SALAMANDER-$Revision: 1.13 $) #0: Sat May 5 06:23:19 PDT 2001 root@lan-gw:/usr/src/sys/arch/i386/compile/SALAMANDER i386
>Description:
If I try to build a kernel for a machine with only a serial
console, and no wscons at all in it, it fails with:

cc  -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -I. -I../../../../arch -I../../../.. -nostdinc -DCONSDEVNAME=\"com\" -DCONADDR="0x3f8" -DCONSPEED="0xe100" -DCONS_OVERRIDE -DRAY_PID_COUNTRY_CODE_DEFAULT="RAY_PID_COUNTRY_CODE_EUROPE" -DMAXUSERS=32 -D_KERNEL -Di386  -c ../../../../compat/linux/arch/i386/linux_machdep.c
../../../../compat/linux/arch/i386/linux_machdep.c: In function `linux_machdepioctl':
../../../../compat/linux/arch/i386/linux_machdep.c:612: storage size of `pt' isn't known
../../../../compat/linux/arch/i386/linux_machdep.c:738: `DIOCGDEFLABEL' undeclared (first use in this function)
../../../../compat/linux/arch/i386/linux_machdep.c:738: (Each undeclared identifier is reported only once
../../../../compat/linux/arch/i386/linux_machdep.c:738: for each function it appears in.)
../../../../compat/linux/arch/i386/linux_machdep.c:739: `DIOCGPART' undeclared (first use in this function)
../../../../compat/linux/arch/i386/linux_machdep.c:788: `PTIOCLINUX' undeclared (first use in this function)
cc1: warnings being treated as errors
../../../../compat/linux/arch/i386/linux_machdep.c:612: warning: unused variable `pt'
*** Error code 1

Stop.

>How-To-Repeat:
Try to build an i386 kernel with wsdisplay* removed and the CONSDEV
stuff added instead.

>Fix:
Index: linux_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/compat/linux/arch/i386/linux_machdep.c,v
retrieving revision 1.50.2.1
diff -u -r1.50.2.1 linux_machdep.c
--- linux_machdep.c	2001/03/30 21:34:21	1.50.2.1
+++ linux_machdep.c	2001/05/09 20:53:33
@@ -62,6 +62,7 @@
 #include <sys/filedesc.h>
 #include <sys/exec_elf.h>
 #include <sys/disklabel.h>
+#include <sys/ioctl.h>
 #include <miscfs/specfs/specdev.h>
 
 #include <compat/linux/common/linux_types.h>
@@ -89,7 +90,6 @@
  */
 #include "wsdisplay.h"
 #if (NWSDISPLAY > 0)
-#include <sys/ioctl.h>
 #include <dev/wscons/wsconsio.h>
 #include <dev/wscons/wsdisplay_usl_io.h>
 #include "opt_xserver.h"
>Release-Note:
>Audit-Trail:
>Unformatted: