[squid] Workaround for sbuf initialization sequence issue upsetting GCC

Henrik Nordström hno at fedoraproject.org
Mon Mar 16 08:07:32 UTC 2015


commit 552b3cdd992504ac79fddb67329282720fa6359d
Author: Henrik Nordstrom <henrik at henriknordstrom.net>
Date:   Mon Mar 16 09:07:24 2015 +0100

    Workaround for sbuf initialization sequence issue upsetting GCC

 squid-3.5.2-sbufstats.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++
 squid.spec                  |  5 ++++-
 2 files changed, 51 insertions(+), 1 deletion(-)
---
diff --git a/squid-3.5.2-sbufstats.patch b/squid-3.5.2-sbufstats.patch
new file mode 100644
index 0000000..b260008
--- /dev/null
+++ b/squid-3.5.2-sbufstats.patch
@@ -0,0 +1,47 @@
+diff -up squid-3.5.2/src/SBufStatsAction.cc.sbufstats squid-3.5.2/src/SBufStatsAction.cc
+--- squid-3.5.2/src/SBufStatsAction.cc.sbufstats	2015-03-15 13:48:36.479197186 +0100
++++ squid-3.5.2/src/SBufStatsAction.cc	2015-03-15 13:49:19.559676380 +0100
+@@ -82,7 +82,8 @@ SBufStatsAction::unpack(const Ipc::Typed
+     msg.getPod(mbdata);
+ }
+ 
+-static const bool Registered = (Mgr::RegisterAction("sbuf",
+-                                "String-Buffer statistics", &SBufStatsAction::Create, 0 , 1),
+-                                true);
+-
++void
++SBufStatsAction::RegisterWithCacheManager()
++{
++    Mgr::RegisterAction("sbuf", "String-Buffer statistics", &SBufStatsAction::Create, 0 , 1);
++}
+diff -up squid-3.5.2/src/SBufStatsAction.h.sbufstats squid-3.5.2/src/SBufStatsAction.h
+--- squid-3.5.2/src/SBufStatsAction.h.sbufstats	2015-02-18 13:17:02.000000000 +0100
++++ squid-3.5.2/src/SBufStatsAction.h	2015-03-15 13:48:36.479197186 +0100
+@@ -21,6 +21,7 @@ class SBufStatsAction: public Mgr::Actio
+ public:
+     /// Mgr::ClassActionCreationHandler for Mgr::RegisterAction()
+     static Pointer Create(const Mgr::CommandPointer &cmd);
++    static void RegisterWithCacheManager(void);
+ 
+ protected:
+     explicit SBufStatsAction(const Mgr::CommandPointer &cmd);
+diff -up squid-3.5.2/src/main.cc.sbufstats squid-3.5.2/src/main.cc
+--- squid-3.5.2/src/main.cc.sbufstats	2015-02-18 13:17:02.000000000 +0100
++++ squid-3.5.2/src/main.cc	2015-03-15 13:48:36.479197186 +0100
+@@ -59,6 +59,7 @@
+ #include "profiler/Profiler.h"
+ #include "redirect.h"
+ #include "refresh.h"
++#include "SBufStatsAction.h"
+ #include "send-announce.h"
+ #include "SquidConfig.h"
+ #include "SquidDns.h"
+@@ -1089,6 +1090,8 @@ mainInitialize(void)
+         /* register the modules in the cache manager menus */
+ 
+         cbdataRegisterWithCacheManager();
++	SBufStatsAction::RegisterWithCacheManager();
++
+         /* These use separate calls so that the comm loops can eventually
+          * coexist.
+          */
diff --git a/squid.spec b/squid.spec
index 712a612..e5d230a 100644
--- a/squid.spec
+++ b/squid.spec
@@ -33,6 +33,7 @@ Patch203: squid-3.0.STABLE1-perlpath.patch
 Patch204: squid-3.2.0.9-fpic.patch
 Patch205: squid-3.1.9-ltdl.patch
 Patch206: active-ftp.patch
+Patch207: squid-3.5.2-sbufstats.patch
 
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: bash >= 2.0
@@ -96,6 +97,7 @@ lookup program (dnsserver), a program for retrieving FTP data
 #%patch205 -p1 -b .ltdl
 # Fails on 3.5.1
 #%patch206 -p1 -b .active-ftp
+%patch207 -p1 -b .sbufstats
 
 %build
 %ifarch sparcv9 sparc64 s390 s390x
@@ -216,7 +218,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc COPYING COPYRIGHT README ChangeLog QUICKSTART src/squid.conf.documented
+%license COPYING 
+%doc CONTRIBUTORS README ChangeLog QUICKSTART src/squid.conf.documented
 %doc contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl
 
 %{_unitdir}/squid.service


More information about the scm-commits mailing list