gnustep-dev
[Top][All Lists]
Advanced

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

inet6 / sockaddr struct


From: Riccardo Mottola
Subject: inet6 / sockaddr struct
Date: Tue, 23 Dec 2014 01:36:58 +0100
User-agent: Mozilla/5.0 (X11; FreeBSD i386; rv:33.0) Gecko/20100101 Firefox/33.0 SeaMonkey/2.30

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




reply via email to

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