]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1167: Cannot build ARP ACL support on FreeBSD 5.3 with gcc 3.4.2
authorserassio <>
Wed, 22 Dec 2004 02:40:16 +0000 (02:40 +0000)
committerserassio <>
Wed, 22 Dec 2004 02:40:16 +0000 (02:40 +0000)
On FreeBSD gcc 3.4.2 doesn't like the following code:

        (char *) sdl = (char *) sin + ROUNDUP(sin->sin_len);

src/ACLARP.cc

index 1f582648f7b5ccdbf2f90c27b93bc2bb9d40e5d2..a4856ba7d137a06cb2310e9f74838be6431240b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLARP.cc,v 1.9 2004/12/20 16:30:32 robertc Exp $
+ * $Id: ACLARP.cc,v 1.10 2004/12/21 19:40:16 serassio Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -492,7 +492,7 @@ aclMatchArp(SplayNode<acl_arp_data *> **dataptr, struct in_addr c)
 #define ROUNDUP(a) \
         ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
 
-        (char *) sdl = (char *) sin + ROUNDUP(sin->sin_len);
+        sdl = (struct sockaddr_dl *)((char *) sin + ROUNDUP(sin->sin_len));
 
         if (c.s_addr == sin->sin_addr.s_addr) {
             if (sdl->sdl_alen) {