--------------------- PatchSet 4406 Date: 2007/04/28 15:46:22 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Fixed compile problems in IPv4-specific parts. Members: lib/IPAddress.cc:1.1.2.30->1.1.2.31 Index: squid3/lib/IPAddress.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/lib/Attic/IPAddress.cc,v retrieving revision 1.1.2.30 retrieving revision 1.1.2.31 diff -u -r1.1.2.30 -r1.1.2.31 --- squid3/lib/IPAddress.cc 28 Apr 2007 14:40:06 -0000 1.1.2.30 +++ squid3/lib/IPAddress.cc 28 Apr 2007 15:46:22 -0000 1.1.2.31 @@ -1,6 +1,6 @@ /* - * $Id: IPAddress.cc,v 1.1.2.30 2007/04/28 14:40:06 amosjeffries Exp $ + * $Id: IPAddress.cc,v 1.1.2.31 2007/04/28 15:46:22 amosjeffries Exp $ * * DEBUG: section 14 IP Storage and Handling * AUTHOR: Amos Jeffries @@ -76,7 +76,7 @@ struct sockaddr m_SocketAddr; */ -#ifndef USE_IPV6 +#if !USE_IPV6 // So there are some places where I will drop to using Macros too. // At least I can restrict them to this file so they don't corrupt the app with C code. # define sin6_addr sin_addr @@ -124,7 +124,7 @@ #if USE_IPV6 uint8_t *ptr= m_SocketAddr.sin6_addr.s6_addr; #else - uint8_t *ptr= m_SocketAddr.sin_addr.s_addr; + uint8_t *ptr= (uint8_t *)&m_SocketAddr.sin_addr.s_addr; #endif /* Let's scan all the bits from Most Significant to Least */ @@ -288,7 +288,7 @@ m_SocketAddr.sin6_addr.s6_addr[15] = 0x1; m_Type = IPv64; #else - m_SocketAddr.sin_addr = 0x7F000001; + m_SocketAddr.sin_addr.s_addr = htonl(0x7F000001); m_Type=IPv4; #endif