Donate Share

curl and libcurl

Tracker: Bugs

5 Include <sys/select.h> on older FreeBSD versions - ID: 2916915
Last Update: Comment added ( bagder )

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!


Peter Pentchev ( roamer ) - 2009-12-18 11:03:37 UTC

5

Closed

Fixed

Daniel Stenberg

compile or build problem

portability problem

Public


Comment ( 1 )

Date: 2009-12-25 23:32:20 UTC
Sender: bagderProject AdminAccepting Donations

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


Attached File ( 1 )

Filename Description Download
curl-include-select.patch Include on older FreeBSD versions, too. Download

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-12-25 23:32:20 UTC bagder
resolution_id None 2009-12-25 23:32:20 UTC bagder
allow_comments 1 2009-12-25 23:32:20 UTC bagder
close_date - 2009-12-25 23:32:20 UTC bagder
File Added 355666: curl-include-select.patch 2009-12-18 11:03:37 UTC roamer