mirror of
https://github.com/moparisthebest/curl
synced 2025-01-04 18:38:03 -05:00
rearranged the connect() call so that there's no interleaved #ifdef, to make
it compiler better on amigaos
This commit is contained in:
parent
3a70d686ee
commit
c5c89862b2
@ -567,13 +567,14 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
|||||||
/* set socket non-blocking */
|
/* set socket non-blocking */
|
||||||
Curl_nonblock(sockfd, TRUE);
|
Curl_nonblock(sockfd, TRUE);
|
||||||
|
|
||||||
rc = connect(sockfd,
|
/* do not use #ifdef within the function arguments below, as connect() is
|
||||||
|
a defined macro on some platforms and some compilers don't like to mix
|
||||||
|
#ifdefs with macro usage! (AmigaOS is one such platform) */
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
ai->ai_addr, ai->ai_addrlen
|
rc = connect(sockfd, ai->ai_addr, ai->ai_addrlen);
|
||||||
#else
|
#else
|
||||||
(struct sockaddr *)&serv_addr, sizeof(serv_addr)
|
rc = connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr);
|
||||||
#endif
|
#endif
|
||||||
);
|
|
||||||
|
|
||||||
if(-1 == rc) {
|
if(-1 == rc) {
|
||||||
int error=Curl_ourerrno();
|
int error=Curl_ourerrno();
|
||||||
|
Loading…
Reference in New Issue
Block a user