Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Mar 1997 19:05:32 -0800 (PST)
From:      Thomas.Traylor@mci.com
To:        freebsd-gnats-submit@freebsd.org
Subject:   misc/3089: /usr/include/sys/select.h causes compilation errors.
Message-ID:  <199703250305.TAA04796@freefall.freebsd.org>
Resent-Message-ID: <199703250310.TAA05447@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3089
>Category:       misc
>Synopsis:       /usr/include/sys/select.h causes compilation errors.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 24 19:10:05 PST 1997
>Last-Modified:
>Originator:     Thomas Traylor
>Organization:
>Release:        FreeBSD 2.2-Release
>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 ()
{ ; }
 
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703250305.TAA04796>