#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5)
he = gethostbyname_r(hostname, h, buffer, size, err);
#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_3)
- he = gethostbyname_r(hostname, h, &buffer);
- *err = h_errno;
+ wxUnusedVar(var);
+ *err = gethostbyname_r(hostname, h, &buffer);
+ he = h;
#elif defined(HAVE_GETHOSTBYNAME)
wxLOCK_GETBY_MUTEX(name);
#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_5)
he = gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer, size, err);
#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_3)
- he = gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer);
- *err = h_errno;
+ wxUnusedVar(size);
+ *err = gethostbyaddr_r(addr_buf, buf_size, proto, h, &buffer);
+ he = h;
#elif defined(HAVE_GETHOSTBYADDR)
wxLOCK_GETBY_MUTEX(addr);
#elif defined(HAVE_FUNC_GETSERVBYNAME_R_5)
se = getservbyname_r(port, protocol, serv, buffer, size);
#elif defined(HAVE_FUNC_GETSERVBYNAME_R_4)
+ wxUnusedVar(size);
if ( getservbyname_r(port, protocol, serv, &buffer) != 0 )
return NULL;
#elif defined(HAVE_GETSERVBYNAME)