[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: External poll still failing to build.

From: Dan Nelson
Subject: Re: External poll still failing to build.
Date: Tue, 11 Mar 2003 15:00:30 -0600
User-agent: Mutt/1.5.3i

In the last episode (Mar 11), Tony Shadwick said:
> > > poll.c: In function `poll':
> > > poll.c:22: `fd_set' undeclared (first use in this function)
> >
> > Could you send back the output of these command:
> >
> > find /usr/include -type f | xargs egrep "fd_set"
> >
> > fd_set should be defined in sys/select.h or sys/types.h, which
> > poll.c already includes.
> [erwin:/Users/numbski] numbski# find /usr/include -type f | xargs egrep 
> "fd_set"
> Binary file /usr/include/libc-gcc3.p matches
> /usr/include/php/ext/standard/file.h:PHP_FUNCTION(fd_set);
> /usr/include/python2.2/pyport.h:typedef struct fd_set {
> /usr/include/python2.2/pyport.h:} fd_set;
> /usr/include/rpc/svc.h:extern fd_set svc_fdset;
> /usr/include/rpc/svc.h:extern void      svc_getreqset   __P((fd_set *));
> /usr/include/sys/types.h:typedef        struct fd_set {
> /usr/include/sys/types.h:} fd_set;
> Binary file /usr/include/unistd-gcc3.p matches
> /usr/include/unistd.h:int        select __P((int, fd_set *, fd_set *, fd_set 
> *, struct timeval *));

I'm completely stumped then.  poll.c includes sys/types.h, which
defines fd_set.

Try compiling this program:

#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
int main(void)
        fd_set readFds;
        return 0;

Save it as test.c, then run "gcc test.c -o test" and see if it prints
any errors.  If that works, try adding these headers:

#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/select.h>

and see if it fails.  More headers shouldn't hurt but apparently they
are causing you problems.

        Dan Nelson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]