Antwort: Re: [syslog-ng] Error compiling syslog-ng 2.0.1 on Solaris, Bug in dnscache.c

Thomas Blank Thomas.Blank at de.debitel.com
Mon Jan 8 10:04:26 CET 2007


Your patch works.
Do you patch the sources?

Thomas



                                                                                                    
             Balazs                                                                                 
             Scheidler                                                                              
             <bazsi at balab                                                                        An 
             it.hu>                Syslog-ng users' and developers' mailing list                    
             Gesendet              <syslog-ng at lists.balabit.hu>                                     
             von:                                                                             Kopie 
             syslog-ng-bo                                                                           
             unces at lists.                                                                     Thema 
             balabit.hu            Re: [syslog-ng] Error compiling syslog-ng 2.0.1 on Solaris, Bug  
                                   in  dnscache.c                                                   
                                                                                                    
             07.01.2007                                                                             
             17:43                                                                                  
                                                                                                    
                                                                                                    
                Bitte                                                                               
             antworten an                                                                           
              Syslog-ng                                                                             
              users' and                                                                            
             developers'                                                                            
             mailing list                                                                           
             <syslog-ng at l                                                                           
             ists.balabit                                                                           
                 .hu>                                                                               
                                                                                                    
                                                                                                    




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

_______________________________________________
syslog-ng maillist  -  syslog-ng at lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html





More information about the syslog-ng mailing list