RFR: 7180557 - InetAddress.getLocalHost throws UnknownHostException on java7u5 on OSX

Rob McKenna rob.mckenna at oracle.com
Wed Sep 4 06:49:28 PDT 2013


Indeed it did.

     -Rob

On 04/09/13 10:36, Chris Hegarty wrote:
> Rob,
>
> I haven't looked at the changes yet, but I'm curious about the 
> decision to use getifaddrs. I know that there was a discussion started 
> at one point to determine what Apple's JDK6 is doing to retrieve the 
> local machines IP information. Did that discussion lead to getifaddrs?
>
> -Chris.
>
> On 03/09/2013 16:18, Rob McKenna wrote:
>> Hi folks,
>>
>> Mac seems to have trouble looking up local hostnames using getaddrinfo
>> unless a domain is set. The solution is to add a check with getifaddrs .
>>
>> This fix replaces a usage of _ALLBSD_SOURCE with MACOSX. I haven't seen
>> a canonical answer on whether this is the way to go so I figured trial
>> by fire might get the discussion going.
>>
>> http://cr.openjdk.java.net/~robm/7180557/webrev.01/
>>
>> -Rob
>>




More information about the net-dev mailing list