From nobody  Mon Mar 24 19:05:32 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.5/8.8.5) id TAA04796;
          Mon, 24 Mar 1997 19:05:32 -0800 (PST)
Message-Id: <199703250305.TAA04796@freefall.freebsd.org>
Date: Mon, 24 Mar 1997 19:05:32 -0800 (PST)
From: Thomas.Traylor@mci.com
To: freebsd-gnats-submit@freebsd.org
Subject: /usr/include/sys/select.h causes compilation errors.
X-Send-Pr-Version: www-1.0

>Number:         3089
>Category:       misc
>Synopsis:       /usr/include/sys/select.h causes compilation errors.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 24 19:10:05 PST 1997
>Closed-Date:    Tue Mar 25 09:37:48 PST 1997
>Last-Modified:  Tue Mar 25 09:38:52 PST 1997
>Originator:     Thomas Traylor
>Release:        FreeBSD 2.2-Release
>Organization:
>Environment:
FreeBSD vulture.cs.mci.com 2.2-RELEASE FreeBSD 2.2-RELEASE #0: Wed Mar 19 17:02:44 MST 1997     root@:/usr/src/sys/compile/VULTURE  i386

>Description:
When sys/select.h is included in your souce code, compilation errors 
occur.  It seems that the structure 'selinfo' (line 44) contains a 
reference to  pid_t.  pid_t has not been defined yet.  The following 
are the error messages from gcc:

In file included from t.c:1:
/usr/include/sys/select.h:45: parse error before `pid_t'
/usr/include/sys/select.h:45: warning: no semicolon at end of struct or union
/usr/include/sys/select.h:47: parse error before `}'


>How-To-Repeat:
Compile the following code:

#include <sys/select.h>
main ()
{ ; }

>Fix:
Put sys/types.h in sys/select.h or put sys/types.h in your code prior
to sys/select.h

This compiles with out error:

#include <sys/types.h>
#include <sys/select.h>
main ()
{ ; }
 
>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: freebsd-gnats-submit@FreeBSD.org, Thomas.Traylor@mci.com
Cc:  Subject: Re: misc/3089: /usr/include/sys/select.h causes compilation errors.
Date: Tue, 25 Mar 1997 15:48:22 +1100

 >>Description:
 >When sys/select.h is included in your souce code, compilation errors 
 >occur.  It seems that the structure 'selinfo' (line 44) contains a 
 >reference to  pid_t.  pid_t has not been defined yet.  The following 
 >are the error messages from gcc:
 
 Don't include <sys/select.h> in your source code.  It is a kernel-only
 header.
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Tue Mar 25 09:37:48 PST 1997 
State-Changed-Why:  
sys/select.h is a kernel include file and should not be 
included by user code.  See "man 2 select" for information 
on which include files are required to use the select system call. 
>Unformatted:
