--- old/src/jdk.jdwp.agent/windows/native/libdt_socket/socket_md.c 2018-01-29 07:30:56.550169288 -0500 +++ new/src/jdk.jdwp.agent/windows/native/libdt_socket/socket_md.c 2018-01-29 07:30:56.159146523 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ */ #include #include +#include #include "sysSocket.h" #include "socketTransport.h" @@ -197,9 +198,11 @@ return send(fd, buf, (int)nBytes, flags); } -struct hostent * -dbgsysGetHostByName(char *hostname) { - return gethostbyname(hostname); +int +dbgsysGetAddrInfo(char *hostname, char *service, + struct addrinfo *hints, + struct addrinfo **result) { + return getaddrinfo(hostname, service, hints, result); } unsigned short @@ -223,7 +226,7 @@ if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) { if (l.l_onoff == 0) { - WSASendDisconnect(fd, NULL); + shutdown(fd, SD_SEND); } } return closesocket(fd); @@ -239,7 +242,9 @@ uint32_t dbgsysInetAddr(const char* cp) { - return (uint32_t)inet_addr(cp); + uint32_t addr; + inet_pton(AF_INET, cp, &addr); + return addr; } uint32_t