gcj on osx questions

Tom Tromey tromey@redhat.com
Tue Dec 13 17:59:00 GMT 2005


>>>>> "Mohan" == Mohan Embar <gnustuff@thisiscool.com> writes:

>>> + memset (&u, 0, sizeof (u));

Bryce> This is odd. Off-hand I do not see a reason why clearing the SockAddr 
Bryce> should be necessary, because it appears that all fields of u.sin_addr 
Bryce> will be initialized properly, at least in the INET4 case. Do you know 
Bryce> how/why it fails without this?

Maybe there are Apple-specific fields.  Or maybe for some reason the
padding must be cleared.

Mohan> No idea, but these posts clued me off and the fix worked for me:

IMO the patch is fine, but it does need a comment explaining why the
memset is there.

Tom



More information about the Java mailing list