diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-01-14 09:11:42 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-01-14 09:11:42 +0000 |
commit | c5c89862b2cb8a0d695d81c2180479d14faf5113 (patch) | |
tree | b5cfac09eb49875296825ae5aec2306f0d01e3c6 | |
parent | 3a70d686eede5b5a8fb3d7b9f35611eac180fd51 (diff) |
rearranged the connect() call so that there's no interleaved #ifdef, to make
it compiler better on amigaos
-rw-r--r-- | lib/connect.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/connect.c b/lib/connect.c index 3fb0a65d6..0dc655353 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -567,13 +567,14 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ /* set socket non-blocking */ 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 - ai->ai_addr, ai->ai_addrlen + rc = connect(sockfd, ai->ai_addr, ai->ai_addrlen); #else - (struct sockaddr *)&serv_addr, sizeof(serv_addr) + rc = connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr); #endif - ); if(-1 == rc) { int error=Curl_ourerrno(); |