--- old/src/java.base/unix/native/libnet/Inet4AddressImpl.c 2020-05-20 18:01:21.071630418 -0700 +++ new/src/java.base/unix/native/libnet/Inet4AddressImpl.c 2020-05-20 18:01:20.691623121 -0700 @@ -64,27 +64,8 @@ if (gethostname(hostname, sizeof(hostname)) != 0) { strcpy(hostname, "localhost"); } else { -#if defined(__solaris__) - // try to resolve hostname via nameservice - // if it is known but getnameinfo fails, hostname will still be the - // value from gethostname - struct addrinfo hints, *res; - // make sure string is null-terminated hostname[NI_MAXHOST] = '\0'; - memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_INET; - - if (getaddrinfo(hostname, NULL, &hints, &res) == 0) { - getnameinfo(res->ai_addr, res->ai_addrlen, hostname, sizeof(hostname), - NULL, 0, NI_NAMEREQD); - freeaddrinfo(res); - } -#else - // make sure string is null-terminated - hostname[NI_MAXHOST] = '\0'; -#endif } return (*env)->NewStringUTF(env, hostname); }