Signed-off-by: Matthias Fischer matthias.fischer@ipfire.org --- lfs/squid | 1 + src/patches/squid/squid-3.5-14091.patch | 132 ++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 src/patches/squid/squid-3.5-14091.patch
diff --git a/lfs/squid b/lfs/squid index c47bd6f..4fa60b2 100644 --- a/lfs/squid +++ b/lfs/squid @@ -79,6 +79,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/squid/squid-3.5-14088.patch cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/squid/squid-3.5-14089.patch cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/squid/squid-3.5-14090.patch + cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/squid/squid-3.5-14091.patch cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/squid-3.5.21-fix-max-file-descriptors.patch
cd $(DIR_APP) && autoreconf -vfi diff --git a/src/patches/squid/squid-3.5-14091.patch b/src/patches/squid/squid-3.5-14091.patch new file mode 100644 index 0000000..4bb8255 --- /dev/null +++ b/src/patches/squid/squid-3.5-14091.patch @@ -0,0 +1,132 @@ +------------------------------------------------------------ +revno: 14091 +revision-id: squid3@treenet.co.nz-20160924223605-2xa0er35fx3dc8jg +parent: squid3@treenet.co.nz-20160923204924-28rxvvbloccrma6a +fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4594 +committer: Amos Jeffries squid3@treenet.co.nz +branch nick: 3.5 +timestamp: Sun 2016-09-25 11:36:05 +1300 +message: + Bug 4594: build failure with clang 3.9 +------------------------------------------------------------ +# Bazaar merge directive format 2 (Bazaar 0.90) +# revision_id: squid3@treenet.co.nz-20160924223605-2xa0er35fx3dc8jg +# target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 +# testament_sha1: b9120ddecb08a583e07444c422722e48e8034d21 +# timestamp: 2016-09-24 22:51:01 +0000 +# source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 +# base_revision_id: squid3@treenet.co.nz-20160923204924-\ +# 28rxvvbloccrma6a +# +# Begin patch +=== modified file 'src/adaptation/ecap/XactionRep.cc' +--- src/adaptation/ecap/XactionRep.cc 2016-01-01 00:14:27 +0000 ++++ src/adaptation/ecap/XactionRep.cc 2016-09-24 22:36:05 +0000 +@@ -726,7 +726,7 @@ + buf.append(" A?", 3); + } + +- buf.Printf(" %s%u]", id.Prefix, id.value); ++ buf.Printf(" %s%u]", id.prefix(), id.value); + + buf.terminate(); + + +=== modified file 'src/adaptation/icap/Xaction.cc' +--- src/adaptation/icap/Xaction.cc 2016-01-01 00:14:27 +0000 ++++ src/adaptation/icap/Xaction.cc 2016-09-24 22:36:05 +0000 +@@ -598,9 +598,7 @@ + fillPendingStatus(buf); + buf.append("/", 1); + fillDoneStatus(buf); +- +- buf.Printf(" %s%u]", id.Prefix, id.value); +- ++ buf.Printf(" %s%u]", id.prefix(), id.value); + buf.terminate(); + + return buf.content(); + +=== modified file 'src/base/AsyncJob.cc' +--- src/base/AsyncJob.cc 2016-01-01 00:14:27 +0000 ++++ src/base/AsyncJob.cc 2016-09-24 22:36:05 +0000 +@@ -164,7 +164,7 @@ + buf.Printf("Stopped, reason:"); + buf.Printf("%s",stopReason); + } +- buf.Printf(" %s%u]", id.Prefix, id.value); ++ buf.Printf(" %s%u]", id.prefix(), id.value); + buf.terminate(); + + return buf.content(); + +=== modified file 'src/base/InstanceId.h' +--- src/base/InstanceId.h 2016-01-01 00:14:27 +0000 ++++ src/base/InstanceId.h 2016-09-24 22:36:05 +0000 +@@ -25,35 +25,41 @@ + public: + typedef unsigned int Value; ///< id storage type; \todo: parameterize? + +- InstanceId(): value(++Last ? Last : ++Last) {} ++ InstanceId(): value(0) {change();} + + operator Value() const { return value; } + bool operator ==(const InstanceId &o) const { return value == o.value; } + bool operator !=(const InstanceId &o) const { return !(*this == o); } +- void change() {value = ++Last ? Last : ++Last;} ++ void change(); + +- /// prints Prefix followed by ID value; \todo: use HEX for value printing? ++ /// prints class-pecific prefix followed by ID value; \todo: use HEX for value printing? + std::ostream &print(std::ostream &os) const; + ++ /// returns the class-pecific prefix ++ const char * const prefix() const; ++ + public: +- static const char *Prefix; ///< Class shorthand string for debugging + Value value; ///< instance identifier + + private: + InstanceId(const InstanceId& right); ///< not implemented; IDs are unique + InstanceId& operator=(const InstanceId &right); ///< not implemented +- +-private: +- static Value Last; ///< the last used ID value + }; + + /// convenience macro to instantiate Class-specific stuff in .cc files +-#define InstanceIdDefinitions(Class, prefix) \ +- template<> const char *InstanceId<Class>::Prefix = prefix; \ +- template<> InstanceId<Class>::Value InstanceId<Class>::Last = 0; \ ++#define InstanceIdDefinitions(Class, pfx) \ ++ template<> const char * const \ ++ InstanceId<Class>::prefix() const { \ ++ return pfx; \ ++ } \ + template<> std::ostream & \ + InstanceId<Class>::print(std::ostream &os) const { \ +- return os << Prefix << value; \ ++ return os << pfx << value; \ ++ } \ ++ template<> void \ ++ InstanceId<Class>::change() { \ ++ static InstanceId<Class>::Value Last = 0; \ ++ value = ++Last ? Last : ++Last; \ + } + + /// print the id + +=== modified file 'src/ssl/PeerConnector.cc' +--- src/ssl/PeerConnector.cc 2016-05-21 17:29:19 +0000 ++++ src/ssl/PeerConnector.cc 2016-09-24 22:36:05 +0000 +@@ -771,7 +771,7 @@ + } + if (serverConn != NULL) + buf.Printf(" FD %d", serverConn->fd); +- buf.Printf(" %s%u]", id.Prefix, id.value); ++ buf.Printf(" %s%u]", id.prefix(), id.value); + buf.terminate(); + + return buf.content(); +