Re: [squid-users] Compiling Problem with transparent proxy on Squid-2.3.STABLE3(SOLARIS 8, 64bit Processor , Sparc)

From: Robin Stevens <robin.stevens@dont-contact.us>
Date: Tue, 7 Aug 2001 10:49:35 +0100

On Tue, Aug 07, 2001 at 12:15:22PM +0900, sovik wrote:
> We wanted to test Transparent Proxy On SOLARIS 8(Squid-2.3.STABLE3 installed)
>
> when configuring squid, we take an option --enable-ipf-transparent
>
> on compiling squid, Following Eorror is shown
>
> In file included from /usr/include/inet/ip.h:18,
> from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/netinet/ip_compat.h:111,
> from client_side.c:47:
> /usr/include/inet/mib2.h:105: `Counter' redeclared as different kind of symbol
> globals.h:138: previous declaration of `Counter'
> In file included from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/netinet/ip_compat.h:111,
> from client_side.c:47:
> /usr/include/inet/ip.h:1337: parse error before "ip6_hbh_t"
> /usr/include/inet/ip.h:1339: parse error before '*' token
> /usr/include/inet/ip.h:1340: parse error before '*' token
> /usr/include/inet/ip.h:1342: parse error before '}' token

This was causing me problems yesterday. The errors appear to originate in
a bit of ipv6 specific code in the headers, so unless you actually use
ipv6, it can be removed, at least while you compile squid.

Quick and dirty solution: edit /usr/include/inet/ip.h and at line 1328,
wrap in a suitable #ifdef, eg:

#ifdef PERSON_WHO_WANTS_IPV6
struct ip6_pkt_s {
        uint_t ipp_fields; /* Which fields are valid */
        uint_t ipp_ifindex; /* pktinfo ifindex */
...
        in6_addr_t ipp_nexthop; /* Transmit only */
};
typedef struct ip6_pkt_s ip6_pkt_t;
#endif

No doubt there's a better way, but this seems to do the job...

-- 
--------------- Robin Stevens  <robin.stevens@oucs.ox.ac.uk> -----------------
Oxford University Computing Services ----------- Web: http://www.cynic.org.uk/
------- (+44)(0)1865: 273212 (work) 273275 (fax)  Mobile: 07776 235326 -------
Received on Tue Aug 07 2001 - 03:49:43 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:29 MST