I haven't investigated the issue, nor the fix, but I know that use if gethostbyname() is no longer recommended, being marked as obsolete:
* http://man7.org/linux/man-pages/man3/gethostbyname.3.html
``` The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead. ```
At some point we should consider replacing these obsolete functions where they are already used in the code, but for now we should try not to add more use of them...