NetBSD Problem Report #12829

Received: (qmail 11203 invoked from network); 4 May 2001 14:41:28 -0000
Message-Id: <200105041442.f44Egcq00417@erika.local>
Date: Fri, 4 May 2001 23:42:38 +0900 (JST)
From: isaki@par.odn.ne.jp
Reply-To: isaki@par.odn.ne.jp
To: gnats-bugs@gnats.netbsd.org
Subject: changing poll(2) in tty breaks building kernel on x68k.
X-Send-Pr-Version: 3.95

>Number:         12829
>Category:       port-x68k
>Synopsis:       changing poll(2) in tty breaks building kernel on x68k.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-x68k-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 04 14:42:01 +0000 2001
>Closed-Date:    Sun May 06 12:28:06 +0000 2001
>Last-Modified:  Sun May 06 12:28:06 +0000 2001
>Originator:     Tetsuya Isaki
>Release:        NetBSD-current 2001/05/03 02:00 JST
>Organization:
>Environment:
NetBSD yuka.local 1.5V NetBSD 1.5V (YUKA-CURRENT) #1: Fri May  4 19:58:24 JST 2001     root@yuka.local:/export/2/current/sys/arch/x68k/compile/YUKA-CURRENT x68k

>Description:
Changing poll(2) by Steve Woodford at 05/02 breaks kernel compile on x68k.

>How-To-Repeat:
cvs update and make kernel on x68k, then  I saw the message.
------------
cc  -O2 -m68020-60 -Wa,-m68030 -Wa,-m68851 -Werror -Wstrict-prototypes -Wmissing
-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -msoft-float -I. -I../
../../../arch -I../../../.. -nostdinc  -DMAXUSERS=8 -D_KERNEL -Dx68k  -c ../../.
./../arch/x68k/dev/com.c
cc1: warnings being treated as errors
../../../../arch/x68k/dev/com.c:632: warning: function declaration isn't a proto
type
*** Error code 1

Stop.
------------

>Fix:
I don't know it is right, but I could compile with this patch.

--- com.c.ORIG  Thu May  3 01:28:30 2001
+++ com.c       Fri May  4 16:05:13 2001
@@ -156,6 +156,7 @@
 int comclose __P((dev_t, int, int, struct proc *));
 int comread __P((dev_t, struct uio *, int));
 int comwrite __P((dev_t, struct uio *, int));
+int compoll __P((dev_t, int, struct proc *));
 int comioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
 struct tty *comtty __P((dev_t));
 void comstop __P((struct tty *, int));

>Release-Note:
>Audit-Trail:

From: Steve Woodford <scw@netbsd.org>
To: isaki@par.odn.ne.jp
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-x68k/12829: changing poll(2) in tty breaks building kernel
 on x68k.
Date: Fri, 4 May 2001 16:11:27 +0100 (BST)

 On Fri, 4 May 2001 isaki@par.odn.ne.jp wrote:

 > >Description:
 > Changing poll(2) by Steve Woodford at 05/02 breaks kernel compile on x68k.
 > 
 > >Fix:
 > I don't know it is right, but I could compile with this patch.

 [snip]

 There are two right ways to fix this:

 1.	Replace your existing function prototypes for comopen(),
 	comclose(), comread() ... with one `cdev_decl(com)'.
 	See the MI com.c for the example.

 2.	Use the MI com.c. ;-)

 Cheers, Steve


State-Changed-From-To: open->feedback 
State-Changed-By: minoura 
State-Changed-When: Fri May 4 18:52:13 PDT 2001 
State-Changed-Why:  
Steve's first suggestion. 
Please test it; I do not have that device (and that's why I cannot use 
the MI com.c :) 
State-Changed-From-To: feedback->closed 
State-Changed-By: minoura 
State-Changed-When: Sun May 6 05:27:11 PDT 2001 
State-Changed-Why:  
The originator says it's Ok. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.