diff --git a/lib/hostip.c b/lib/hostip.c index 9acb9a978..913acbee3 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -467,7 +467,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data, /* Linux */ if( gethostbyname_r(hostname, (struct hostent *)buf, - buf + sizeof(struct hostent), + (char *)buf + sizeof(struct hostent), CURL_NAMELOOKUP_SIZE - sizeof(struct hostent), &h, /* DIFFERENCE */ &h_errnop))