typecast the conversion from const char * to char *
authorDaniel Stenberg <daniel@haxx.se>
Wed, 19 Mar 2003 09:16:59 +0000 (09:16 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 19 Mar 2003 09:16:59 +0000 (09:16 +0000)
lib/hostip.c

index 2cee362..b12b2b9 100644 (file)
@@ -511,7 +511,7 @@ static struct hostent* pack_hostent(char** buf, struct hostent* orig)
 }
 #endif
 
-static char *MakeIP(unsigned long num,char *addr, int addr_len)
+static char *MakeIP(unsigned long num, char *addr, int addr_len)
 {
 #if defined(HAVE_INET_NTOA) || defined(HAVE_INET_NTOA_R)
   struct in_addr in;
@@ -594,7 +594,7 @@ static Curl_addrinfo *my_getaddrinfo(struct SessionHandle *data,
     h->h_addrtype = AF_INET;
     h->h_length = sizeof(*addrentry);
     h->h_name = &buf->h_name[0];
-    MakeIP(ntohl(in), h->h_name, sizeof(buf->h_name));
+    MakeIP(ntohl(in), (char *)h->h_name, sizeof(buf->h_name));
   }
 #if defined(HAVE_GETHOSTBYNAME_R)
   else {