This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj on osx questions


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]