]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
squid: Fix build on ARM
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Feb 2015 12:43:04 +0000 (12:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Feb 2015 12:43:04 +0000 (12:43 +0000)
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
src/patches/squid-3.5.1-build-fix-1.patch [new file with mode: 0644]

index 98359fa08859a3d2d3eb146eb9134b199aa98cbf..f1bc42128e4d55c97df19d918afb7a15f164cd35 100644 (file)
--- 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 (file)
index 0000000..18c9551
--- /dev/null
@@ -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)();