[libvirt] Don't use private struct member names of in6_addr

Daniel Veillard veillard at redhat.com
Mon Nov 2 14:46:50 UTC 2009


On Sat, Oct 31, 2009 at 12:16:14PM +0100, Daniel Veillard wrote:
> On Fri, Oct 30, 2009 at 05:07:50PM +0100, Matthias Bolte wrote:
> > __in6_u.__u6_addr16 is the private name for this struct member,
> > s6_addr16 is the public one. Our buildserver revealed this problem,
> > because for some reason the internal names are missing the __ prefix
> > there.
> > 
> > Matthias
> 
> > diff --git a/src/util/network.c b/src/util/network.c
> > index abd866c..5e3cb3a 100644
> > --- a/src/util/network.c
> > +++ b/src/util/network.c
> > @@ -46,7 +46,7 @@ static int getIPv6Addr(virSocketAddrPtr addr, virIPv6AddrPtr tab) {
> >      if ((addr == NULL) || (tab == NULL) || (addr->stor.ss_family != AF_INET6))
> >          return(-1);
> >  
> > -    val = (virIPv6AddrPtr) &(addr->inet6.sin6_addr.__in6_u.__u6_addr16);
> > +    val = (virIPv6AddrPtr) &(addr->inet6.sin6_addr.s6_addr16);
> >  
> >      for (i = 0;i < 8;i++) {
> >          (*tab)[i] = ntohs((*val)[i]);
> 
> 
>   ACK ! Thanks for spotting this !

  Okay, I commited it !

    thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list