JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

Langer, Christoph christoph.langer at sap.com
Fri Feb 2 09:21:17 UTC 2018

Hi Gary,

> Here's a revised webrev
>    http://cr.openjdk.java.net/~gadams/8080990/webrev.01/index.html
> Still testing ...
> Using shutdown() fixed problems reported by the 
> java/nio/channelSocketChannel tests.

The fix looks good. I would think we should rename dbgsysInetAddr to dbgsysPToN and use inet_pton also for the Unix/Linux platforms. It would be the better choice there as well, though we still only support IPv4 in libdt_socket.

> I also noticed prior use of getaddrinfo for "localhost" was not calling 
> freeaddrinfo.

Thanks for spotting/fixing that.

Best regards

More information about the build-dev mailing list