[syslog-ng] Error compiling syslog-ng 2.0.1 on Solaris, Bug in
dnscache.c
Balazs Scheidler
bazsi at balabit.hu
Sun Jan 7 17:43:32 CET 2007
On Thu, 2007-01-04 at 15:30 +0100, Thomas Blank wrote:
> I tried to compile syslog-ng 2.0.1 on a Solaris 10-machine, but gcc exits
> with an error:
>
> [...]
> dnscache.c: In function `dns_cache_key_hash':
> dnscache.c:82: error: structure has no member named `s6_addr32'
> dnscache.c:82: error: structure has no member named `s6_addr32'
> dnscache.c:82: error: structure has no member named `s6_addr32'
> dnscache.c:82: error: structure has no member named `s6_addr32'
> make[2]: *** [dnscache.o] Error 1
> [...]
Can you test this patch?
--- orig/src/dnscache.c
+++ mod/src/dnscache.c
@@ -75,9 +75,14 @@ static guint
dns_cache_key_hash(DNSCacheKey *e)
{
if (e->family == AF_INET)
- return ntohl(e->addr.ip.s_addr);
+ {
+ return ntohl(e->addr.ip.s_addr);
+ }
else
- return (0x80000000 | (e->addr.ip6.s6_addr32[0] ^ e->addr.ip6.s6_addr32[2] ^ e->addr.ip6.s6_addr32[3] ^ e->addr.ip6.s6_addr32[4]));
+ {
+ guint32 *a32 = (guint32 *) &e->addr.ip6.s6_addr;
+ return (0x80000000 | (a32[0] ^ a32[1] ^ a32[2] ^ a32[3]));
+ }
}
static inline void
--
Bazsi
More information about the syslog-ng
mailing list