Re: [PATCH][RFC] variable overlapping causing errors...
Fergus Henderson <[email protected]> Fri, 8 Oct 2010 15:39:41 -0400
| Newsgroups | gmane.comp.compilers.distcc |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the patch! Applied in svn revision 733. On Tue, Oct 5, 2010 at 1:12 PM, Ian Kumlien <[email protected]> wrote: > Hi, > > It seems like s6_addr is a reserved type, on my macine (Gentoo linux, > building current svn trunk) i get the following error: > src/access.c: In function 'set_mask_inet6': > src/access.c:118:14: error: expected '=', ',', ';', 'asm' or > '__attribute__' before '.' token > src/access.c:118:14: error: expected expression before '.' token > src/access.c:123:9: error: '__in6_u' undeclared (first use in this > function) > src/access.c:123:9: note: each undeclared identifier is reported only once > for each function it appears in > make: *** [src/access.o] Error 1 > > The fix is quite easy, when you see it: > This line: > uint8_t *s6_addr = addr->s6_addr; > > Expands to: > uint8_t *__in6_u.__u6_addr8 = addr->__in6_u.__u6_addr8; > > Which is wrong, this patch is against r730 on trunk. > > --- src/access.c.orig 2010-10-05 19:01:56.133363116 +0200 > +++ src/access.c 2010-10-05 19:02:25.911554579 +0200 > @@ -115,18 +115,18 @@ > * Set a v6 address, @p addr, to a mask of @p mask_size bits. > **/ > static void set_mask_inet6(struct in6_addr *addr, int mask_bits) { > - uint8_t *s6_addr = addr->s6_addr; > + uint8_t *ip6_addr = addr->s6_addr; > int allones_count = mask_bits / 8; > int i; > > for (i = 0; i < allones_count; i++) > - s6_addr[i] = allones8; > + ip6_addr[i] = allones8; > > - s6_addr[i] = ~(allones8 >> (mask_bits % 8)); > + ip6_addr[i] = ~(allones8 >> (mask_bits % 8)); > i++; > > for (; i < 16; i++) > - s6_addr[i] = 0; > + ip6_addr[i] = 0; > } > #endif /* ENABLE_RFC2553 */ > > > __ > distcc mailing list http://distcc.samba.org/ > To unsubscribe or change options: > https://lists.samba.org/mailman/listinfo/distcc > -- Fergus Henderson <[email protected]> "Defend the user, exclude no one, and create magic." -- Eric Schmidt. __ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/distcc