From e3055063b939efdf4e460e337693d986aef10989 Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Tue, 23 Jun 2009 08:20:02 +0200 Subject: [PATCH] squid: Fix typecasting issue with newer gcc. Signed-off-by: Kedar Sovani --- squid-3.0.STABLE13-gcc44.patch | 28 ++++++++++++++++++++++++++++ squid.spec | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletions(-) create mode 100644 squid-3.0.STABLE13-gcc44.patch diff --git a/squid-3.0.STABLE13-gcc44.patch b/squid-3.0.STABLE13-gcc44.patch new file mode 100644 index 0000000..3137c58 --- /dev/null +++ b/squid-3.0.STABLE13-gcc44.patch @@ -0,0 +1,28 @@ +--- squid-3.0.STABLE13/src/wccp2.cc 2009-02-03 02:36:23.000000000 +0100 ++++ squid-3.0.STABLE13.wccp/src/wccp2.cc 2009-03-06 16:04:14.000000000 +0100 +@@ -1182,8 +1182,9 @@ + + /* Go through the data structure */ + while (data_length > offset) { ++ char *data = wccp2_i_see_you.data; + +- header = (struct wccp2_item_header_t *) &wccp2_i_see_you.data[offset]; ++ header = (struct wccp2_item_header_t *) &data[offset]; + + switch (ntohs(header->type)) { + +--- squid-3.0.STABLE13.orig/src/logfile.cc 2009-02-02 20:36:22.000000000 -0500 ++++ squid-3.0.STABLE13/src/logfile.cc 2009-06-18 09:10:33.000000000 -0400 +@@ -102,10 +102,10 @@ logfileOpen(const char *path, size_t buf + + if (path[6] != '\0') { + path += 7; +- char* delim = strchr(path, '.'); ++ char* delim = (char *)strchr(path, '.'); + + if (!delim) +- delim = strchr(path, '|'); ++ delim = (char *)strchr(path, '|'); + + if (delim != NULL) + *delim = '\0'; diff --git a/squid.spec b/squid.spec index 40f9a85..405c034 100644 --- a/squid.spec +++ b/squid.spec @@ -4,7 +4,7 @@ Name: squid Version: 3.0.STABLE13 -Release: 1%{?dist} +Release: 1%{?dist}.fa1 Summary: The Squid proxy caching server Epoch: 7 License: GPLv2+ @@ -34,6 +34,7 @@ Patch204: squid-3.0.STABLE1-perlpath.patch Patch205: squid-3.0.STABLE1-smb-path.patch #Patch207: squid-3.0.STABLE5-configure_netfilter.patch Patch208: squid-3.0.STABLE7-from_manpg.patch +Patch209: squid-3.0.STABLE13-gcc44.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: bash >= 2.0 @@ -66,6 +67,7 @@ lookup program (dnsserver), a program for retrieving FTP data %patch205 -p1 -b .smb-path #%patch207 -p1 -b .configure_netfilter %patch208 -p1 -b .from_manpg +%patch209 -p1 -b .typecast %build export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char %{optflags}" ; export LDFLAGS="-pie" ; @@ -338,6 +340,9 @@ fi chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || : %changelog +* Tue Jun 23 2009 Kedar Sovani - 7:3.0.STABLE13-1.fa1 +- fix a problem with typecasting on newer gcc. + * Thu Feb 5 2009 Jonathan Steffan - 7:3.0.STABLE13-1 - upgrade to latest upstream -- 1.5.5.6