From dc7bdd56a69cac2ea7968e92d28eafd5c85d1dcb Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 14 Feb 2015 12:43:04 +0000 Subject: [PATCH] squid: Fix build on ARM cc1plus: warnings being treated as errors FtpRelay.cc: In member function 'virtual void Ftp::Relay::handleControlReply()': FtpRelay.cc:323: error: NULL used in arithmetic FtpRelay.cc: In member function 'void Ftp::Relay::forwardPreliminaryReply(void (Ftp::Relay::*)())': FtpRelay.cc:362: error: NULL used in arithmetic FtpRelay.cc: In member function 'void Ftp::Relay::proceedAfterPreliminaryReply()': FtpRelay.cc:381: error: NULL used in arithmetic make[4]: *** [FtpRelay.lo] Error 1 --- lfs/squid | 1 + src/patches/squid-3.5.1-build-fix-1.patch | 29 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/patches/squid-3.5.1-build-fix-1.patch diff --git a/lfs/squid b/lfs/squid index 98359fa088..f1bc42128e 100644 --- a/lfs/squid +++ b/lfs/squid @@ -70,6 +70,7 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xaf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squid-3.5.1-build-fix-1.patch cd $(DIR_APP) && ./configure \ --prefix=/usr \ --sysconfdir=/etc/squid \ diff --git a/src/patches/squid-3.5.1-build-fix-1.patch b/src/patches/squid-3.5.1-build-fix-1.patch new file mode 100644 index 0000000000..18c9551712 --- /dev/null +++ b/src/patches/squid-3.5.1-build-fix-1.patch @@ -0,0 +1,29 @@ +--- squid-3.5.1/src/clients/FtpRelay.cc.orig 2015-02-14 12:34:18.988891510 +0000 ++++ squid-3.5.1/src/clients/FtpRelay.cc 2015-02-14 12:36:11.693043739 +0000 +@@ -320,7 +320,7 @@ + return; // didn't get complete reply yet + + assert(state < END); +- assert(this->SM_FUNCS[state] != NULL); ++ assert(this->SM_FUNCS[state]); + (this->*SM_FUNCS[state])(); + } + +@@ -359,7 +359,7 @@ + debugs(9, 5, "forwarding preliminary reply to client"); + + // we must prevent concurrent ConnStateData::sendControlMsg() calls +- Must(thePreliminaryCb == NULL); ++ Must(!thePreliminaryCb); + thePreliminaryCb = cb; + + const HttpReply::Pointer reply = createHttpReply(Http::scContinue); +@@ -378,7 +378,7 @@ + { + debugs(9, 5, "proceeding after preliminary reply to client"); + +- Must(thePreliminaryCb != NULL); ++ Must(thePreliminaryCb); + const PreliminaryCb cb = thePreliminaryCb; + thePreliminaryCb = NULL; + (this->*cb)(); -- 2.39.5