Revision: 25704 http://sourceforge.net/p/gar/code/25704 Author: dmichelsen Date: 2016-05-10 07:46:12 +0000 (Tue, 10 May 2016) Log Message: ----------- squid/trunk: Update to 3.5.19 and remove obsolete patches
Modified Paths: -------------- csw/mgar/pkg/squid/trunk/Makefile csw/mgar/pkg/squid/trunk/checksums Removed Paths: ------------- csw/mgar/pkg/squid/trunk/files/bug3664.patch csw/mgar/pkg/squid/trunk/files/bug4057.patch csw/mgar/pkg/squid/trunk/files/bug4482.patch csw/mgar/pkg/squid/trunk/files/opt-cflags-configure.ap.patch csw/mgar/pkg/squid/trunk/files/solaris10_fix_bug3754_mk3.patch Modified: csw/mgar/pkg/squid/trunk/Makefile =================================================================== --- csw/mgar/pkg/squid/trunk/Makefile 2016-05-09 19:59:09 UTC (rev 25703) +++ csw/mgar/pkg/squid/trunk/Makefile 2016-05-10 07:46:12 UTC (rev 25704) @@ -2,7 +2,7 @@ # $Id$ # NAME = squid -VERSION = 3.5.17 +VERSION = 3.5.19 GARTYPE = v2 DESCRIPTION = High performance Web proxy cache @@ -17,22 +17,6 @@ MASTER_SITES = http://www.squid-cache.org/Versions/v$(V1)/$(V12)/ DISTFILES += $(DISTNAME).tar.bz2 -# ssl_crtd fails to build on OpenSolaris/OpenIndiana/Solaris 11 -# From http://bugs.squid-cache.org/show_bug.cgi?id=3664 -#PATCHFILES += bug3664.patch - -# configure doesnt detect IPFilter 5.1.2 system headers -# From http://bugs.squid-cache.org/show_bug.cgi?id=3754 -#PATCHFILES += solaris10_fix_bug3754_mk3.patch - -# Squid 3.4.5 crashes when adaptation_access is used -# From http://bugs.squid-cache.org/show_bug.cgi?id=4057 -#PATCHFILES += bug4057.patch - -PATCHFILES += bug4482.patch -# bug4483 integrated in squid-4 -PATCHFILES += opt-cflags-configure.ap.patch - PACKAGES = CSWsquid RUNTIME_DEP_PKGS_CSWsquid += CSWliblber2-4-2 RUNTIME_DEP_PKGS_CSWsquid += CSWlibldap2-4-2 @@ -63,7 +47,7 @@ MIGRATE_SOURCE_DIR = /opt/csw/etc MIGRATE_DEST_DIR = /etc/opt/csw/$(NAME) -MIGRATE_FILES = cachemgr.conf +MIGRATE_FILES += cachemgr.conf MIGRATE_FILES += mime.conf MIGRATE_FILES += squid.conf Modified: csw/mgar/pkg/squid/trunk/checksums =================================================================== --- csw/mgar/pkg/squid/trunk/checksums 2016-05-09 19:59:09 UTC (rev 25703) +++ csw/mgar/pkg/squid/trunk/checksums 2016-05-10 07:46:12 UTC (rev 25704) @@ -1 +1 @@ -229ad68a5af2c46aa85e55bde8519847 squid-3.5.17.tar.bz2 +5d3f046b547d5a033f76085ca6d3425e squid-3.5.19.tar.bz2 Deleted: csw/mgar/pkg/squid/trunk/files/bug3664.patch =================================================================== --- csw/mgar/pkg/squid/trunk/files/bug3664.patch 2016-05-09 19:59:09 UTC (rev 25703) +++ csw/mgar/pkg/squid/trunk/files/bug3664.patch 2016-05-10 07:46:12 UTC (rev 25704) @@ -1,29 +0,0 @@ ---- orig_certificate_db.cc Sat Oct 6 23:24:28 2012 -+++ orig_certificate_db.cc Sat Oct 6 23:36:52 2012 -@@ -51,7 +51,7 @@ - hFile = CreateFile(TEXT(filename.c_str()), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) - #else -- fd = open(filename.c_str(), 0); -+ fd = open(filename.c_str(), 2); - if (fd == -1) - #endif - throw std::runtime_error("Failed to open file " + filename); -@@ -60,7 +60,7 @@ - #if _SQUID_MSWIN_ - if (!LockFile(hFile, 0, 0, 1, 0)) - #else -- if (flock(fd, LOCK_EX) != 0) -+ if (lockf(fd, F_LOCK, 0) != 0) - #endif - throw std::runtime_error("Failed to get a lock of " + filename); - } -@@ -75,7 +75,7 @@ - } - #else - if (fd != -1) { -- flock(fd, LOCK_UN); -+ lockf(fd, F_ULOCK, 0); - close(fd); - fd = -1; - } Deleted: csw/mgar/pkg/squid/trunk/files/bug4057.patch =================================================================== --- csw/mgar/pkg/squid/trunk/files/bug4057.patch 2016-05-09 19:59:09 UTC (rev 25703) +++ csw/mgar/pkg/squid/trunk/files/bug4057.patch 2016-05-10 07:46:12 UTC (rev 25704) @@ -1,43 +0,0 @@ ---- src/adaptation/AccessRule.cc 2014-06-03 07:05:07 +0000 -+++ src/adaptation/AccessRule.cc 2014-12-14 11:02:41 +0000 -@@ -52,8 +52,8 @@ - Adaptation::AccessRules & - Adaptation::AllRules() - { -- static AccessRules TheRules; -- return TheRules; -+ static AccessRules *TheRules = new AccessRules; -+ return *TheRules; - } - - // TODO: make AccessRules::find work - -=== modified file 'src/adaptation/Service.cc' ---- src/adaptation/Service.cc 2012-08-28 13:00:30 +0000 -+++ src/adaptation/Service.cc 2014-12-14 11:02:41 +0000 -@@ -54,8 +54,8 @@ - Adaptation::Services & - Adaptation::AllServices() - { -- static Services TheServices; -- return TheServices; -+ static Services *TheServices = new Services; -+ return *TheServices; - } - - Adaptation::ServicePointer - -=== modified file 'src/adaptation/ServiceGroups.cc' ---- src/adaptation/ServiceGroups.cc 2013-09-28 13:03:58 +0000 -+++ src/adaptation/ServiceGroups.cc 2014-12-14 11:02:41 +0000 -@@ -315,8 +315,8 @@ - Adaptation::Groups & - Adaptation::AllGroups() - { -- static Groups TheGroups; -- return TheGroups; -+ static Groups *TheGroups = new Groups; -+ return *TheGroups; - } - - Adaptation::ServiceGroupPointer Deleted: csw/mgar/pkg/squid/trunk/files/bug4482.patch =================================================================== --- csw/mgar/pkg/squid/trunk/files/bug4482.patch 2016-05-09 19:59:09 UTC (rev 25703) +++ csw/mgar/pkg/squid/trunk/files/bug4482.patch 2016-05-10 07:46:12 UTC (rev 25704) @@ -1,11 +0,0 @@ ---- a/src/ip/Intercept.cc -+++ b/src/ip/Intercept.cc -@@ -205,7 +205,7 @@ Ip::Intercept::IpfInterception(const Comm::ConnectionPointer &newConn, int silen - // warn once every 10 at critical level, then push down a level each repeated event - static int warningLevel = DBG_CRITICAL; - debugs(89, warningLevel, "IPF (IPFilter v4) NAT does not support IPv6. Please upgrade to IPFilter v5.1"); -- warningLevel = ++warningLevel % 10; -+ warningLevel = (warningLevel+1) % 10; - return false; - #else - natLookup.nl_v = 6; Deleted: csw/mgar/pkg/squid/trunk/files/opt-cflags-configure.ap.patch =================================================================== --- csw/mgar/pkg/squid/trunk/files/opt-cflags-configure.ap.patch 2016-05-09 19:59:09 UTC (rev 25703) +++ csw/mgar/pkg/squid/trunk/files/opt-cflags-configure.ap.patch 2016-05-10 07:46:12 UTC (rev 25704) @@ -1,20 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -400,7 +400,7 @@ AC_ARG_ENABLE(optimizations, - if test "x$enableval" = "xno" ; then - AC_MSG_NOTICE([Disabling compiler optimizations (-O flag)]) - CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`" -- CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9]]*//'`" -+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9g]]*//'`" - enable_inline="no" - fi - ]) -@@ -3237,7 +3237,7 @@ case "$host" in - i386-*-solaris2.*) - if test "x$GCC" = "xyes"; then - AC_MSG_NOTICE([Removing -O for gcc on $host]) -- CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`" -+ CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9g]]*//'`" - fi - ;; - Deleted: csw/mgar/pkg/squid/trunk/files/solaris10_fix_bug3754_mk3.patch =================================================================== --- csw/mgar/pkg/squid/trunk/files/solaris10_fix_bug3754_mk3.patch 2016-05-09 19:59:09 UTC (rev 25703) +++ csw/mgar/pkg/squid/trunk/files/solaris10_fix_bug3754_mk3.patch 2016-05-10 07:46:12 UTC (rev 25704) @@ -1,578 +0,0 @@ -diff -ur squid-3.4.10-A/configure squid-3.4.10/configure ---- squid-3.4.10-A/configure Tue Dec 9 22:28:58 2014 -+++ squid-3.4.10/configure Fri Jan 2 15:03:58 2015 -@@ -1,7 +1,7 @@ - #! /bin/sh - # From configure.ac Revision. - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.69 for Squid Web Proxy 3.4.10. -+# Generated by GNU Autoconf 2.69 for Squid Web Proxy 3.4.10-BZR. - # - # Report bugs to <http://bugs.squid-cache.org/>. - # -@@ -595,8 +595,8 @@ - # Identity of this package. - PACKAGE_NAME='Squid Web Proxy' - PACKAGE_TARNAME='squid' --PACKAGE_VERSION='3.4.10' --PACKAGE_STRING='Squid Web Proxy 3.4.10' -+PACKAGE_VERSION='3.4.10-BZR' -+PACKAGE_STRING='Squid Web Proxy 3.4.10-BZR' - PACKAGE_BUGREPORT='http://bugs.squid-cache.org/' - PACKAGE_URL='' - -@@ -1605,7 +1605,7 @@ - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures Squid Web Proxy 3.4.10 to adapt to many kinds of systems. -+\`configure' configures Squid Web Proxy 3.4.10-BZR to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -1675,7 +1675,7 @@ - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of Squid Web Proxy 3.4.10:";; -+ short | recursive ) echo "Configuration of Squid Web Proxy 3.4.10-BZR:";; - esac - cat <<\_ACEOF - -@@ -2071,7 +2071,7 @@ - test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF --Squid Web Proxy configure 3.4.10 -+Squid Web Proxy configure 3.4.10-BZR - generated by GNU Autoconf 2.69 - - Copyright (C) 2012 Free Software Foundation, Inc. -@@ -3175,7 +3175,7 @@ - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by Squid Web Proxy $as_me 3.4.10, which was -+It was created by Squid Web Proxy $as_me 3.4.10-BZR, which was - generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ -@@ -4042,7 +4042,7 @@ - - # Define the identity of the package. - PACKAGE='squid' -- VERSION='3.4.10' -+ VERSION='3.4.10-BZR' - - - cat >>confdefs.h <<_ACEOF -@@ -4461,6 +4461,9 @@ - - - -+ -+ -+ - # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- - # serial 1 (pkg-config-0.24) - # -@@ -27258,10 +27261,6 @@ - iostream \ - fstream \ - climits \ -- ip_compat.h \ -- ip_fil_compat.h \ -- ip_fil.h \ -- ip_nat.h \ - ipl.h \ - lber.h \ - ldap.h \ -@@ -27279,7 +27278,6 @@ - netdb.h \ - netinet/in.h \ - netinet/in_systm.h \ -- netinet/ip_fil_compat.h \ - openssl/err.h \ - openssl/md5.h \ - openssl/opensslv.h \ -@@ -27309,6 +27307,7 @@ - strings.h \ - sys/bitypes.h \ - sys/file.h \ -+ sys/ioccom.h \ - sys/ioctl.h \ - sys/ipc.cc \ - sys/param.h \ -@@ -27419,12 +27418,8 @@ - netinet/in.h \ - netinet/ip.h \ - netinet/ip6.h \ -- netinet/ip_compat.h\ -- netinet/ip_fil_compat.h\ -- netinet/ip_fil.h\ - netinet/ip_icmp.h \ - netinet/ipl.h \ -- netinet/ip_nat.h\ - net/pf/pfvar.h \ - net/pfvar.h \ - sys/mount.h\ -@@ -32220,8 +32215,138 @@ - fi - - -- - if test "x$enable_ipf_transparent" != "xno" ; then -+ -+ if test "x$squid_cv_broken_ipfilter_minor_t" = "x"; then -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+# include <sys/types.h> -+# include <sys/ioccom.h> -+# include <netinet/in.h> -+ -+# include <netinet/ip_compat.h> -+# include <netinet/ip_fil.h> -+# include <netinet/ip_nat.h> -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_cxx_try_compile "$LINENO"; then : -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ squid_cv_broken_ipfilter_minor_t=0 -+ -+else -+ -+ ## on fail, test the hack -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+#define minor_t fubaar -+# include <sys/types.h> -+# include <sys/ioccom.h> -+# include <netinet/in.h> -+#undef minor_t -+# include <netinet/ip_compat.h> -+# include <netinet/ip_fil.h> -+# include <netinet/ip_nat.h> -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_cxx_try_compile "$LINENO"; then : -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ squid_cv_broken_ipfilter_minor_t=1 -+ -+else -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to make IPFilter work with netinet/ headers" >&5 -+$as_echo "unable to make IPFilter work with netinet/ headers" >&6; } -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ fi -+ -+ -+cat >>confdefs.h <<_ACEOF -+#define USE_SOLARIS_IPFILTER_MINOR_T_HACK $squid_cv_broken_ipfilter_minor_t -+_ACEOF -+ -+ -+## check for IPFilter headers that require this hack -+## (but first netinet/in.h and sys/ioccom.h which they depend on) -+ for ac_header in \ -+ netinet/in.h \ -+ sys/ioccom.h \ -+ ip_compat.h \ -+ ip_fil_compat.h \ -+ ip_fil.h \ -+ ip_nat.h \ -+ netinet/ip_compat.h \ -+ netinet/ip_fil_compat.h \ -+ netinet/ip_fil.h \ -+ netinet/ip_nat.h \ -+ -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -+#if USE_SOLARIS_IPFILTER_MINOR_T_HACK -+#define minor_t fubar -+#endif -+#if HAVE_SYS_TYPES_H -+#include <sys/types.h> -+#endif -+#if HAVE_NETINET_IN_H -+#include <netinet/in.h> -+#endif -+#if HAVE_SYS_IOCCOM_H -+#include <sys/ioccom.h> -+#endif -+#if USE_SOLARIS_IPFILTER_MINOR_T_HACK -+#undef minor_t -+#endif -+#if HAVE_IP_COMPAT_H -+#include <ip_compat.h> -+#elif HAVE_NETINET_IP_COMPAT_H -+#include <netinet/ip_compat.h> -+#endif -+#if HAVE_IP_FIL_H -+#include <ip_fil.h> -+#elif HAVE_NETINET_IP_FIL_H -+#include <netinet/ip_fil.h> -+#endif -+#if !defined(IPFILTER_VERSION) -+#define IPFILTER_VERSION 5000004 -+#endif -+ -+" -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of IP-Filter header files" >&5 - $as_echo_n "checking for availability of IP-Filter header files... " >&6; } - # hold on to your hats... -@@ -32230,8 +32355,8 @@ - "x$ac_cv_header_netinet_ip_compat_h" = "xyes" -o \ - "x$ac_cv_header_netinet_ip_fil_compat_h" = "xyes" ; then - have_ipfilter_compat_header="yes" -- fi -- if test "x$have_ipfilter_compat_header" = "xyes" -a \ -+ fi -+ if test "x$have_ipfilter_compat_header" = "xyes" -a \ - "x$ac_cv_header_ip_fil_h" = "xyes" -a \ - "x$ac_cv_header_ip_nat_h" = "xyes" ; then - enable_ipf_transparent="yes" -@@ -32244,6 +32369,15 @@ - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPF_TRANSPARENT" >&5 - $as_echo "$IPF_TRANSPARENT" >&6; } -+ -+## On Solaris Ipfilter includes expect that SOLARIS2 is defined with the -+## Solaris minor version (8, 9, 10, ...) -+ if test "x$enable_ipf_transparent" = "xyes" -a "x$squid_host_os" = "xsolaris" ; then -+ solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'` -+ CFLAGS="-DSOLARIS2=$solrev $CFLAGS" -+ CXXFLAGS="-DSOLARIS2=$solrev $CXXFLAGS" -+ fi -+ - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: IPF-based transparent proxying enabled: $enable_ipf_transparent" >&5 - $as_echo "$as_me: IPF-based transparent proxying enabled: $enable_ipf_transparent" >&6;} -@@ -32262,12 +32396,6 @@ - unset squid_tmp_define - - --if test "x$enable_ipf_transparent" = "xyes" -a "x$squid_host_os" = "xsolaris" ; then -- solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'` -- CFLAGS="-DSOLARIS2=$solrev $CFLAGS" -- CXXFLAGS="-DSOLARIS2=$solrev $CXXFLAGS" --fi -- - if test "x$with_nat_devpf" != "xno" ; then - if test "x$ac_cv_header_net_pfvar_h" = "xyes" -o \ - "x$ac_cv_header_net_pf_pfvar_h" = "xyes"; then -@@ -34255,7 +34383,7 @@ - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" --This file was extended by Squid Web Proxy $as_me 3.4.10, which was -+This file was extended by Squid Web Proxy $as_me 3.4.10-BZR, which was - generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -34321,7 +34449,7 @@ - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" - ac_cs_version="\\ --Squid Web Proxy config.status 3.4.10 -+Squid Web Proxy config.status 3.4.10-BZR - configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -diff -ur squid-3.4.10-A/configure.ac squid-3.4.10/configure.ac ---- squid-3.4.10-A/configure.ac Tue Dec 9 22:28:58 2014 -+++ squid-3.4.10/configure.ac Fri Jan 2 13:33:20 2015 -@@ -2239,10 +2239,6 @@ - iostream \ - fstream \ - climits \ -- ip_compat.h \ -- ip_fil_compat.h \ -- ip_fil.h \ -- ip_nat.h \ - ipl.h \ - lber.h \ - ldap.h \ -@@ -2260,7 +2256,6 @@ - netdb.h \ - netinet/in.h \ - netinet/in_systm.h \ -- netinet/ip_fil_compat.h \ - openssl/err.h \ - openssl/md5.h \ - openssl/opensslv.h \ -@@ -2290,6 +2285,7 @@ - strings.h \ - sys/bitypes.h \ - sys/file.h \ -+ sys/ioccom.h \ - sys/ioctl.h \ - sys/ipc.cc \ - sys/param.h \ -@@ -2348,12 +2344,8 @@ - netinet/in.h \ - netinet/ip.h \ - netinet/ip6.h \ -- netinet/ip_compat.h\ -- netinet/ip_fil_compat.h\ -- netinet/ip_fil.h\ - netinet/ip_icmp.h \ - netinet/ipl.h \ -- netinet/ip_nat.h\ - net/pf/pfvar.h \ - net/pfvar.h \ - sys/mount.h\ -@@ -3238,10 +3230,10 @@ - SQUID_CHECK_FUNC_VACOPY - SQUID_CHECK_FUNC___VACOPY - -- - dnl IP-Filter support requires ipf header files. These aren't - dnl installed by default, so we need to check for them - if test "x$enable_ipf_transparent" != "xno" ; then -+ SQUID_CHECK_BROKEN_SOLARIS_IPFILTER - AC_MSG_CHECKING(for availability of IP-Filter header files) - # hold on to your hats... - if test "x$ac_cv_header_ip_compat_h" = "xyes" -o \ -@@ -3249,8 +3241,8 @@ - "x$ac_cv_header_netinet_ip_compat_h" = "xyes" -o \ - "x$ac_cv_header_netinet_ip_fil_compat_h" = "xyes" ; then - have_ipfilter_compat_header="yes" -- fi -- if test "x$have_ipfilter_compat_header" = "xyes" -a \ -+ fi -+ if test "x$have_ipfilter_compat_header" = "xyes" -a \ - "x$ac_cv_header_ip_fil_h" = "xyes" -a \ - "x$ac_cv_header_ip_nat_h" = "xyes" ; then - enable_ipf_transparent="yes" -@@ -3262,19 +3254,20 @@ - enable_ipf_transparent="no" - fi - AC_MSG_RESULT($IPF_TRANSPARENT) -+ -+## On Solaris Ipfilter includes expect that SOLARIS2 is defined with the -+## Solaris minor version (8, 9, 10, ...) -+ if test "x$enable_ipf_transparent" = "xyes" -a "x$squid_host_os" = "xsolaris" ; then -+ solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'` -+ CFLAGS="-DSOLARIS2=$solrev $CFLAGS" -+ CXXFLAGS="-DSOLARIS2=$solrev $CXXFLAGS" -+ fi -+ - fi - AC_MSG_NOTICE([IPF-based transparent proxying enabled: $enable_ipf_transparent]) - SQUID_DEFINE_BOOL(IPF_TRANSPARENT,$enable_ipf_transparent, - [Enable support for IPF-style transparent proxying]) - --if test "x$enable_ipf_transparent" = "xyes" -a "x$squid_host_os" = "xsolaris" ; then --dnl On Solaris Ipfilter includes expect that SOLARIS2 is defined with the --dnl Solaris minor version (8, 9, 10, ...) -- solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'` -- CFLAGS="-DSOLARIS2=$solrev $CFLAGS" -- CXXFLAGS="-DSOLARIS2=$solrev $CXXFLAGS" --fi -- - dnl PF /dev/pf support requires a header file. - if test "x$with_nat_devpf" != "xno" ; then - if test "x$ac_cv_header_net_pfvar_h" = "xyes" -o \ -diff -ur squid-3.4.10-A/acinclude/os-deps.m4 squid-3.4.10/acinclude/os-deps.m4 ---- squid-3.4.10-A/acinclude/os-deps.m4 Tue Dec 9 22:27:21 2014 -+++ squid-3.4.10/acinclude/os-deps.m4 Fri Jan 2 13:32:12 2015 -@@ -902,3 +902,69 @@ - AC_DEFINE_UNQUOTED(RECV_ARG_TYPE,$squid_cv_recv_second_arg_type, - [Base type of the second argument to recv(2)]) - ]) -+ -+ -+dnl check whether Solaris has broken IPFilter headers (Solaris 10 at least does) -+AC_DEFUN([SQUID_CHECK_BROKEN_SOLARIS_IPFILTER],[ -+ if test "x$squid_cv_broken_ipfilter_minor_t" = "x"; then -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+# include <sys/types.h> -+# include <sys/ioccom.h> -+# include <netinet/in.h> -+ -+# include <netinet/ip_compat.h> -+# include <netinet/ip_fil.h> -+# include <netinet/ip_nat.h> -+ ]])],[ -+ AC_MSG_RESULT(no) -+ squid_cv_broken_ipfilter_minor_t=0 -+ ],[ -+ ## on fail, test the hack -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#define minor_t fubaar -+# include <sys/types.h> -+# include <sys/ioccom.h> -+# include <netinet/in.h> -+#undef minor_t -+# include <netinet/ip_compat.h> -+# include <netinet/ip_fil.h> -+# include <netinet/ip_nat.h> -+ ]])],[ -+ AC_DEFINE_UNQUOTED(USE_SOLARIS_IPFILTER_MINOR_T_HACK,1, -+ [Workaround IPFilter minor_t breakage]) -+ AC_MSG_RESULT(yes) -+ squid_cv_broken_ipfilter_minor_t=1 -+ ],[ -+ AC_MSG_RESULT(unable to make IPFilter work with netinet/ headers) -+ ]) -+ ]) -+ fi -+ -+## check for IPFilter headers that require this hack -+## (and first netinet/in.h which they depend on) -+ AC_CHECK_HEADERS( \ -+ netinet/in.h \ -+ ip_compat.h \ -+ ip_fil_compat.h \ -+ ip_fil.h \ -+ ip_nat.h \ -+ netinet/ip_compat.h \ -+ netinet/ip_fil_compat.h \ -+ netinet/ip_fil.h \ -+ netinet/ip_nat.h \ -+ ,,,[ -+#if USE_SOLARIS_IPFILTER_MINOR_T_HACK -+#define minor_t fubar -+#endif -+SQUID_BSDNET_INCLUDES -+#if !defined(IPFILTER_VERSION) -+#define IPFILTER_VERSION 5000004 -+#endif -+#if HAVE_SYS_IOCCOM_H -+#include <sys/ioccom.h> -+#endif -+#if USE_SOLARIS_IPFILTER_MINOR_T_HACK -+#undef minor_t -+#endif -+ ]) -+]) -diff -ur squid-3.4.10-A/compat/compat.h squid-3.4.10/compat/compat.h ---- squid-3.4.10-A/compat/compat.h Tue Dec 9 22:27:21 2014 -+++ squid-3.4.10/compat/compat.h Fri Jan 2 15:00:18 2015 -@@ -34,6 +34,17 @@ - #endif - #endif - -+/* Solaris 10 has a broken definition for minor_t in IPFilter compat. -+ * We must pre-define before doing anything with OS headers so the OS -+ * do not. Then un-define it before using the IPFilter *_compat.h headers. -+ */ -+#if IPF_TRANSPARENT && USE_SOLARIS_IPFILTER_MINOR_T_HACK -+/* But we only need do this nasty thing for src/ip/Intercept.cc */ -+#if BUILDING_SQUID_IP_INTERCEPT_CC -+#define minor_t solaris_minor_t_fubar -+#endif -+#endif -+ - /*****************************************************/ - /* FDSETSIZE is messy and needs to be done before */ - /* sys/types.h are defined. */ -diff -ur squid-3.4.10-A/include/autoconf.h.in squid-3.4.10/include/autoconf.h.in ---- squid-3.4.10-A/include/autoconf.h.in Tue Dec 9 22:27:45 2014 -+++ squid-3.4.10/include/autoconf.h.in Fri Jan 2 15:12:03 2015 -@@ -1017,6 +1017,9 @@ - /* Define to 1 if you have the <sys/file.h> header file. */ - #undef HAVE_SYS_FILE_H - -+/* Define to 1 if you have the <sys/ioccom.h> header file. */ -+#undef HAVE_SYS_IOCCOM_H -+ - /* Define to 1 if you have the <sys/ioctl.h> header file. */ - #undef HAVE_SYS_IOCTL_H - -@@ -1446,6 +1449,9 @@ - /* Use Winsock select() for the IO loop */ - #undef USE_SELECT_WIN32 - -+/* Workaround IPFilter minor_t breakage */ -+#undef USE_SOLARIS_IPFILTER_MINOR_T_HACK -+ - /* Compile the ESI processor and Surrogate header support */ - #undef USE_SQUID_ESI - -diff -ur squid-3.4.10-A/src/ip/Intercept.cc squid-3.4.10/src/ip/Intercept.cc ---- squid-3.4.10-A/src/ip/Intercept.cc Tue Dec 9 22:27:21 2014 -+++ squid-3.4.10/src/ip/Intercept.cc Fri Jan 2 16:01:35 2015 -@@ -30,6 +30,10 @@ - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. - * - */ -+ -+// Enable hack to workaround Solaris 10 IPFilter breakage -+#define BUILDING_SQUID_IP_INTERCEPT_CC 1 -+ - #include "squid.h" - #include "comm/Connection.h" - #include "ip/Intercept.h" -@@ -38,11 +42,24 @@ - - #if IPF_TRANSPARENT - -+#if !defined(IPFILTER_VERSION) -+#define IPFILTER_VERSION 5000004 -+#endif -+ -+#if HAVE_SYS_IOCCOM_H -+#include <sys/ioccom.h> -+#endif - #if HAVE_SYS_IOCTL_H - #include <sys/ioctl.h> - #endif -+#if HAVE_NETINET_IN_H -+//#include <netinet/in.h> -+#endif -+#if HAVE_NETINET_IP6_H -+#include <netinet/ip6.h> -+#endif - #if HAVE_NETINET_TCP_H --#include <netinet/tcp.h> -+//#include <netinet/tcp.h> - #endif - #if HAVE_NET_IF_H - #include <net/if.h> -@@ -52,6 +69,9 @@ - #elif HAVE_NETINET_IPL_H - #include <netinet/ipl.h> - #endif -+#if USE_SOLARIS_IPFILTER_MINOR_T_HACK -+#undef minor_t -+#endif - #if HAVE_IP_FIL_COMPAT_H - #include <ip_fil_compat.h> - #elif HAVE_NETINET_IP_FIL_COMPAT_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.