Subject: kern/2848: Kernel compile failure in -current using pcvt console.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <roskens@cs.umn.edu>
List: netbsd-bugs
Date: 10/15/1996 13:39:16
>Number:         2848
>Category:       kern
>Synopsis:       -current kernel fails to compile.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 15 11:50:01 1996
>Last-Modified:
>Originator:     Ron Roskens
>Organization:
>Release:        1.2
>Environment:
	
System: NetBSD reality.roskens.org 1.2 NetBSD 1.2 (REAL) #2: Sun Oct 13 13:47:38 CDT 1996 root@myname.my.domain:/usr/src/sys/arch/i386/compile/REAL i386
NetBSD-current sources as of Oct. 15.


>Description:
Kernel compile fails and exits with the following error:
cc  -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -I. -I../../../../arch -I../../../.. -nostdinc -DI586_CPU -DXSERVER -DUCONSOLE -DINSECURE -DMACHINE_NONCONTIG -DTIMEZONE="0x168" -DDST="1" -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DDDB -DDIAGNOSTIC -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DCOMPAT_NOMID -DCOMPAT_12 -DEXEC_SCRIPT -DEXEC_AOUT -DUSER_LDT -DLKM -DFFS -DMFS -DMSDOSFS -DFDESC -DFIFO -DKERNFS -DNULLFS -DPROCFS -DUMAPFS -DUNION -DINET -DGENERIC -DMAXUSERS=32 -D_KERNEL  -Di386  -c ../../../../arch/i386/isa/pcvt/pcvt_ext.c
cc1: warnings being treated as errors
../../../../arch/i386/isa/pcvt/pcvt_ext.c: In function `usl_vt_ioctl':
../../../../arch/i386/isa/pcvt/pcvt_ext.c:2747: warning: unused variable `fp'
*** Error code 1

Stop.


>How-To-Repeat:
	Configure a kernel using pcvt without adding COMPAT_1X.
>Fix:
apply the following patch:

*** pcvt_ext.c.orig	Mon Oct 14 11:09:35 1996
--- pcvt_ext.c	Tue Oct 15 13:33:37 1996
***************
*** 2743,2754 ****
--- 2743,2757 ----
  		/* grant the process IO access; only allowed if euid == 0 */
  	{
  
+ #if (PCVT_NETBSD <= 100) || defined(COMPAT_10) || defined(COMPAT_11)
+ 		/* This is done by i386_iopl(3) now. */
  #if PCVT_NETBSD > 9 || PCVT_FREEBSD >= 200
  		struct trapframe *fp = (struct trapframe *)p->p_md.md_regs;
  #elif PCVT_NETBSD || (PCVT_FREEBSD && PCVT_FREEBSD > 102)
  		struct trapframe *fp = (struct trapframe *)p->p_regs;
  #else
  		struct syscframe *fp = (struct syscframe *)p->p_regs;
+ #endif
  #endif
  
  		if(suser(p->p_ucred, &p->p_acflag) != 0)
	
>Audit-Trail:
>Unformatted: