[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-port-sparc
Subject:    Re: egcs & sparc.
From:       Jason Thorpe <thorpej () nas ! nasa ! gov>
Date:       1998-10-30 20:16:28
[Download RAW message or body]

On Fri, 30 Oct 1998 10:37:14 -0500 
 Ken Hornstein <kenh@cmf.nrl.navy.mil> wrote:

 > So, what's the right thing to do if you're not supposed to cast
 > struct sockaddr * to struct sockaddr_in *?

Well, normally you cast a struct sockaddr_foo to a struct sockaddr, because
the sockaddr is the generic structure.

To work around this in the code, you could do that ifconfig(8) does (similar
problem on Alpha, in this case):

struct  ifaliasreq      addreq __attribute__((aligned(4)));

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 940 5942

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic