aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-02-28 01:35:53 +0000
committerYang Tse <yangsita@gmail.com>2009-02-28 01:35:53 +0000
commit8d78a33e60e64ef92120652d01e0aa1c0da9216c (patch)
tree71cbdcf77250cc86835be88588aaac2a8c2bc5a3 /lib
parentdf07537ccf98fd7984563dda89218f0d3bd0d6f6 (diff)
for portability reasons: s/inet_pton/Curl_inet_pton/
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 3b2b65c71..ba337bc79 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -87,6 +87,7 @@
#include "multiif.h"
#include "sockaddr.h" /* required for Curl_sockaddr_storage */
#include "inet_ntop.h"
+#include "inet_pton.h"
#include "sslgen.h" /* for Curl_ssl_check_cxn() */
/* The last #include file should be: */
@@ -383,8 +384,8 @@ static CURLcode bindlocal(struct connectdata *conn,
if(done > 0) {
#ifdef ENABLE_IPV6
/* ipv6 address */
- if ( (af == AF_INET6) &&
- inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0 ) {
+ if((af == AF_INET6) &&
+ (Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0)) {
si6->sin6_family = AF_INET6;
si6->sin6_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in6);
@@ -392,7 +393,8 @@ static CURLcode bindlocal(struct connectdata *conn,
else
#endif
/* ipv4 address */
- if ( af == AF_INET && inet_pton(AF_INET, myhost, &si4->sin_addr) > 0 ) {
+ if((af == AF_INET) &&
+ (Curl_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) {
si4->sin_family = AF_INET;
si4->sin_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in);