]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2299: src/ACLARP.cc fails to compile on Solaris 10
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 6 Apr 2008 12:37:53 +0000 (00:37 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 6 Apr 2008 12:37:53 +0000 (00:37 +1200)
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>

src/ACLARP.cc

index 391edb2daa2cec87b0d99023f37bc2f18af4628e..ee008dd0b6ec743e8ff8d2d3ce0427f95cd419fa 100644 (file)
@@ -247,6 +247,7 @@ int
 aclMatchArp(SplayNode<acl_arp_data *> **dataptr, IPAddress &c)
 {
     struct arpreq arpReq;
+    struct sockaddr_in *sa = NULL;
 
     IPAddress ipAddr = c;
 
@@ -254,7 +255,6 @@ aclMatchArp(SplayNode<acl_arp_data *> **dataptr, IPAddress &c)
 
     unsigned char ifbuffer[sizeof(struct ifreq) * 64];
     struct ifconf ifc;
-    struct sockaddr_in *sa = NULL;
 
     struct ifreq *ifr;
     int offset;
@@ -406,7 +406,8 @@ aclMatchArp(SplayNode<acl_arp_data *> **dataptr, IPAddress &c)
 
     memset(&arpReq, '\0', sizeof(arpReq));
 
-    ipAddr.GetSockAddr(arpReq.arp_pa);
+    sa = (sockaddr_in*)&arpReq.arp_pa;
+    ipAddr.GetSockAddr(*sa);
 
     /* Query ARP table */
     if (ioctl(HttpSockets[0], SIOCGARP, &arpReq) != -1) {