svn commit: samba r25495 - in branches: SAMBA_3_2/source/lib/replace/system SAMBA_3_2_0/source/lib/replace/system

simo idra at samba.org
Wed Oct 3 22:30:07 GMT 2007


On Wed, 2007-10-03 at 15:17 -0700, Jeremy Allison wrote:
> On Wed, Oct 03, 2007 at 06:05:54PM -0400, simo wrote:
> > On Wed, 2007-10-03 at 22:01 +0000, jra at samba.org wrote:
> > > Author: jra
> > > Date: 2007-10-03 22:01:25 +0000 (Wed, 03 Oct 2007)
> > > New Revision: 25495
> > > 
> > > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25495
> > > 
> > > Log:
> > > Fixup definitions for missing sockaddr_storage.
> > > Jeremy.
> > > 
> > > Modified:
> > >    branches/SAMBA_3_2/source/lib/replace/system/network.h
> > >    branches/SAMBA_3_2_0/source/lib/replace/system/network.h
> > > 
> > > 
> > > Changeset:
> > > Modified: branches/SAMBA_3_2/source/lib/replace/system/network.h
> > > ===================================================================
> > > --- branches/SAMBA_3_2/source/lib/replace/system/network.h	2007-10-03 21:14:20 UTC (rev 25494)
> > > +++ branches/SAMBA_3_2/source/lib/replace/system/network.h	2007-10-03 22:01:25 UTC (rev 25495)
> > > @@ -127,7 +127,8 @@
> > >  #endif
> > >  
> > >  #ifndef HAVE_SOCKADDR_STORAGE
> > > -#define sockaddr_storage sockaddr
> > > +#define sockaddr_storage sockaddr_in
> > 
> > shouldn't this be:
> > #define sockaddr_storage sockaddr_in6
> > ?
> > 
> > sockarrd_in6 is bigger in size
> 
> Nope - because if you don't have sockaddr_storage
> it's a dead cert you don't have sockaddr_in6 - no
> IPv6 - so just use IPv4 sockaddr_in.
> 
> If we find any platforms where this isn't the
> case I can add an #ifdef HAVE_STRUCT_SOCKADDR_IN6
> and use that by preference.

not sure this is true, as sockaddr_storage IIRC has been introduced
after sockaddr_in6, but I guess we will find it out on the build farm
hopefully.

The fact is that we usually always cast this structure, maybe we should
undefine sockaddr_in6 just to be paranoid ?

Simo.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the samba-technical mailing list