Subject: kern/2467: sys/protosw.h lacking forward definition
To: None <gnats-bugs@NetBSD.ORG>
From: Taras Ivanenko <ivanenko@ctps01.mit.edu>
List: netbsd-bugs
Date: 05/24/1996 14:49:51
>Number:         2467
>Category:       kern
>Synopsis:       sys/protosw.h needs the forward definition of struct proc;
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 24 15:35:02 1996
>Last-Modified:
>Originator:     Taras Ivanenko
>Organization:
MIT
	
>Release:        <NetBSD-current source date>  May 24 14:33:27 1996
>Environment:
	
Machine Independent 
System: NetBSD ctps01.mit.edu 1.1 NetBSD 1.1 (ctp-sun-slc-disk) #0: Wed Mar 20 22:54:14 EST 1996 ivanenko@ctps03.mit.edu:/usr/src/sys/arch/sparc/compile/ctp-sun-slc-disk sparc


>Description:
	sys/protosw.h declares a function using "struct proc *" and 
the compiler does not like that definition with -Werror

/* user-protocol hook */
	int	(*pr_usrreq)		/* user request: see list below */
			__P((struct socket *, int, struct mbuf *,
			     struct mbuf *, struct mbuf *, struct proc *));


>How-To-Repeat:
  I noticed that while compiling usr.bin/netstat.h

>Fix:
	

  Declare forward struct proc:

ctps01 70 $ diff -c protosw.h protosw.h~
*** protosw.h   Fri May 24 14:33:27 1996
--- protosw.h~  Wed May 22 16:24:50 1996
***************
*** 62,68 ****
  struct sockaddr;
  struct socket;
  struct domain;
- struct proc;
  
  struct protosw {
        short   pr_type;                /* socket type used for */
--- 62,67 ----

>Audit-Trail:
>Unformatted: