cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2916915 ] Include <sys/select.h> on older FreeBSD versions

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 25 Dec 2009 23:32:20 +0000

Bugs item #2916915, was opened at 2009-12-18 12:03
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2916915&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: compile or build problem
Group: portability problem
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Peter Pentchev (roamer)
Assigned to: Daniel Stenberg (bagder)
Summary: Include <sys/select.h> on older FreeBSD versions

Initial Comment:
This is not a problem with the curl/libcurl build per se, but rather with programs that use it. In include/curl/multi.h, there is a function prototype that uses the fd_set type, which ought to be declared in <sys/select.h>. If a curl consumer has forgotten to include <sys/types.h> and <sys/select.h>, as xmlrpc-c does, a simple #include <curl.h> would be enough to break the compilation.

Of course, this could be construed as a problem in curl consumers - if you use network sockets, use the network API :) However, there are programs that have no obvious need for the <sys/select.h> definitions, and for them, the attached patch should fix the problem on earlier versions of FreeBSD.

If for some reason this patch does not go through, it will very soon be available at http://cvsweb.freebsd.org/ports/ftp/curl/files/patch-include__curl__curl.h

Actually... this patch just adds FreeBSD < 8 to the list of OS's for which <sys/select.h> is included conditionally. I wonder if this should not be made unconditional, since multi.h does use the fd_set everywhere. But for the present, this is enough to get the FreeBSD ports of other programs to build, so it's basically your call from here on :) I have no problem with this remaining a local patch in the FreeBSD port, too.

Thanks for your work on cURL!

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-12-26 00:32

Message:
Thanks for the report, this problem is now fixed in CVS!

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2916915&group_id=976
Received on 2009-12-26

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET