Bläddra i källkod

2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Fixed compile error without zlib
	* src/HttpResponseCommand.cc
Tatsuhiro Tsujikawa 15 år sedan
förälder
incheckning
1906832f43
2 ändrade filer med 10 tillägg och 1 borttagningar
  1. 5 0
      ChangeLog
  2. 5 1
      src/HttpResponseCommand.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2010-09-13  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Fixed compile error without zlib
+	* src/HttpResponseCommand.cc
+
 2010-09-13  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Removed ChunkedDecoder. Moved GZipDecodingStreamFilter to under

+ 5 - 1
src/HttpResponseCommand.cc

@@ -72,8 +72,10 @@
 #include "StreamFilter.h"
 #include "SinkStreamFilter.h"
 #include "ChunkedDecodingStreamFilter.h"
-#include "GZipDecodingStreamFilter.h"
 #include "uri.h"
+#ifdef HAVE_LIBZ
+# include "GZipDecodingStreamFilter.h"
+#endif // HAVE_LIBZ
 
 namespace aria2 {
 
@@ -459,6 +461,7 @@ bool HttpResponseCommand::skipResponseBody
 static bool decideFileAllocation
 (const SharedHandle<StreamFilter>& filter)
 {
+#ifdef HAVE_LIBZ
   for(SharedHandle<StreamFilter> f = filter; !f.isNull(); f = f->getDelegate()){
     // Since the compressed file's length are returned in the response header
     // and the decompressed file size is unknown at this point, disable file
@@ -467,6 +470,7 @@ static bool decideFileAllocation
       return false;
     }
   }
+#endif // HAVE_LIBZ
   return true;
 }