Commit 8d78a33e authored by Yang Tse's avatar Yang Tse
Browse files

for portability reasons: s/inet_pton/Curl_inet_pton/

parent df07537c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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: */
@@ -384,7 +385,7 @@ static CURLcode bindlocal(struct connectdata *conn,
#ifdef ENABLE_IPV6
      /* ipv6 address */
      if((af == AF_INET6) &&
           inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0 ) {
         (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);