From: serassio <> Date: Wed, 22 Dec 2004 02:40:16 +0000 (+0000) Subject: Bug #1167: Cannot build ARP ACL support on FreeBSD 5.3 with gcc 3.4.2 X-Git-Tag: SQUID_3_0_PRE4~955 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3bbddff8fae4e4f88330d4fb7a6c43eaa3ef90c;p=thirdparty%2Fsquid.git Bug #1167: Cannot build ARP ACL support on FreeBSD 5.3 with gcc 3.4.2 On FreeBSD gcc 3.4.2 doesn't like the following code: (char *) sdl = (char *) sin + ROUNDUP(sin->sin_len); --- diff --git a/src/ACLARP.cc b/src/ACLARP.cc index 1f582648f7..a4856ba7d1 100644 --- a/src/ACLARP.cc +++ b/src/ACLARP.cc @@ -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 **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) {