pkgsrc-Bugs archive

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

Re: pkg/36974 (xorp doesn't compile targeted at arm)

The following reply was made to PR pkg/36974; it has been noted by GNATS.

From: Ignatios Souvatzis <>
Subject: Re: pkg/36974 (xorp doesn't compile targeted at arm)
Date: Mon, 18 May 2009 06:54:36 +0200

 On Tue, May 12, 2009 at 02:02:33PM +0000, wrote:
 > Synopsis: xorp doesn't compile targeted at arm
 > State-Changed-From-To: open->feedback
 > State-Changed-By:
 > State-Changed-When: Tue, 12 May 2009 14:02:32 +0000
 > State-Changed-Why:
 > Updated to 1.6.  Would you try to build the version?
 Same as 1.5: 
 cc1plus: warnings being treated as errors In member function 'size_t IPvX::copy_out(sockaddr_in&) const': warning: cast from 'sockaddr_in*' to 'sockaddr_in6*' increases 
 ired alignment of target type In member function 'size_t IPvX::copy_in(const sockaddr_in&)': warning: cast from 'const sockaddr_in*' to 'const sockaddr_in6*' 
 creases required alignment of target type
 gmake[3]: *** [ipvx.lo] Error 1
 OK, I was brave and looked at the code.
 What they do is simply wrong... IPv6 cases bolted on IPv4-code as an
 afterthought. So they assume they could add a few AF_INET6 cases even 
 when sockaddr_in is used, in case parts of the code are still wrong.
 Only this doesn't work, because of different size in addition to
 different alignment restrictions.
 They should have used struct sockaddr in the old days, with casting
 it to sockaddr_in where necessary; then they could have globally
 s/struct sockaddr/struct sockaddr_storage/ for the modern days.
 Lukem@ pointed out, that in Stevens, Unix Network Programming, Volume 1
 page 72/73 all this stuff is explained (e.g. fig 3.6).
 <lukem> `` If any socket address structures that the systems upports have
 +alignment requirements, the sockaddr_storage proivides the strictest
 +alignment requirement. ''

Home | Main Index | Thread Index | Old Index