gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inet6 / sockaddr struct


From: Ivan Vučica
Subject: Re: inet6 / sockaddr struct
Date: Thu, 25 Dec 2014 17:17:31 +0000

'sockaddr_ind' is almost certainly a typo as Google search claims it appears only in GNUstep code.

I don't know about sin6_port. 

Quickly looking through git blame on Github, it seems that the code mentioning sockaddr_ind and sin6_port was checked in by Richard, in SVN revision 33933, on Oct 3, 2011.

On Tue, Dec 23, 2014 at 12:36 AM, Riccardo Mottola <address@hidden> wrote:
Hi,

I'm trying to compile on older Solaris, sparc, without TLS and without ICU.

Compilation currently fails with:

GSSocketStream.m:145: warning: cast increases required alignment of target type
GSSocketStream.m:197: warning: cast increases required alignment of target type
GSSocketStream.m:200: warning: cast increases required alignment of target type
GSSocketStream.m:206: warning: subscript has type `char'
GSSocketStream.m:243: error: dereferencing pointer to incomplete type
GSSocketStream.m: In function `+[GSStreamHandler tryInput:output:]':
GSSocketStream.m:294: warning: cast increases required alignment of target type
GSSocketStream.m: In function `-[GSStreamHandler bye]':

I get really a ton of "warning: cast increases required alignment of target type" on sparc, also when I build on NetBSD.. anyway.

It looks like a problem with IPV6 support/detection? Most probably non INET6 code-path gets rarely tested today.

Is that correct or should the "fallback" be sin_port instead?

in any case, I get the same error, I suppose it is a problem with sockaddr_ind, I suppose this should be sockaddr_in

I just commited this patch:

-  ((struct sockaddr_ind*)sin)->sin6_port = GSSwapHostI16ToBig(port);
+  ((struct sockaddr_in*)sin)->sin_port = GSSwapHostI16ToBig(port);


please comment or revert it if you disagree.

Riccardo


_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev



--
Ivan Vučica
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]