DragonFly BSD
DragonFly bugs List (threaded) for 2006-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Undefined reference to 'select()'

From: walt <wa1ter@xxxxxxxxxxxxx>
Date: Sat, 17 Jun 2006 14:03:16 -0700

Simon 'corecode' Schubert wrote:
> On 17.06.2006, at 09:25, walt wrote:
>> Here is the actual code from fam, and there is no extern "C"
>> appearing anywhere in the file:
> yes, it should be around the declaration
>>  int status = ::select(nfds, &readfds, &writefds, 0, timeout);

Fam has one other example of the use of extern "C", but it
encloses the declaration (or is it definition?) of a prototype.
In the example above there is no prototype for 'select', so I'm
not sure where the 'extern' should go.

Just for fun I added this prototype to the code:
extern "C" int select(int, fd_set*, fd_set*, fd_set*, struct timeval*);
Now I get complaints from <sys/select.h> about duplicate definitions
of select()  :o(

I've tried surrounding my new prototype with various #ifndefs, but
no joy so far.

I'm wondering if the recent changes to select.h have resulted in
a circular dependency somewhere.  Dunno.

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