cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: problem in connect.c under cygwin?, patch for connect.c and connect.h

From: SM <nntp_at_iname.com>
Date: Fri, 05 Oct 2001 04:44:59 +0400

Hi Kevin,
At 12:37 04-10-2001 -0400, Roth, Kevin P. wrote:
>>>>

I'm attempting to build curl 7.9.1-pre2 under cygwin, to try out the cygwin
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I../include -g \
 -O2 -c connect.c -DDLL_EXPORT -DPIC -o .libs/connect.lo
connect.c: In function `Curl_connecthost':
connect.c:461: called object is not a function

<<<<
I was getting the same error with VC.
>>>>
   /* create an IPv4 TCP socket */
   sockfd = socket(AF_INET, SOCK_STREAM, 0);
<<<<
I solved it a few minutes ago. The Curl_connecthost function uses the int
*socket parameter. That causes the error in the socket() function.
Changing the *socket and all references to it in the Curl_connecthost
function will fix the problem.

CURLcode Curl_connecthost(struct connectdata *conn, /* context */
                          Curl_addrinfo *remotehost, /* use one in here */
                          int port, /* connect to this */
                          int *socket, /* the connected socket */
                          Curl_ipconnect **addr) /* the one we used */

The attached diffs were made against the CVS code for today.

Daniel, I will commit the new lib/Makefile.vc6 and lib/curllib.dsp files.

Regards,
-sm

Received on 2001-10-05