summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2017-01-25 21:38:05 +0100
committerDavid Seifert <soap@gentoo.org>2017-01-26 23:38:59 +0100
commit32d49f7d930a0112b5281ebb75e4fdb5c2cd9275 (patch)
treeed4dd76f795d975af45f5316847e025b7c63a93c /net-p2p/airdcpp-webclient/files
parentnet-proxy/dante: remove unused patches (diff)
downloadgentoo-32d49f7d930a0112b5281ebb75e4fdb5c2cd9275.tar.gz
gentoo-32d49f7d930a0112b5281ebb75e4fdb5c2cd9275.tar.bz2
gentoo-32d49f7d930a0112b5281ebb75e4fdb5c2cd9275.zip
net-p2p/airdcpp-webclient: fix an issue with zlib >= 1.2.10
Package-Manager: Portage-2.3.3, Repoman-2.3.1 Closes: https://github.com/gentoo/gentoo/pull/3651
Diffstat (limited to 'net-p2p/airdcpp-webclient/files')
-rw-r--r--net-p2p/airdcpp-webclient/files/airdcpp-webclient-1.4.1-fix-zlib-errors.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/net-p2p/airdcpp-webclient/files/airdcpp-webclient-1.4.1-fix-zlib-errors.patch b/net-p2p/airdcpp-webclient/files/airdcpp-webclient-1.4.1-fix-zlib-errors.patch
new file mode 100644
index 00000000000..ad5a379c201
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/files/airdcpp-webclient-1.4.1-fix-zlib-errors.patch
@@ -0,0 +1,23 @@
+diff --git a/airdcpp-core/airdcpp/ZUtils.cpp b/airdcpp-core/airdcpp/ZUtils.cpp
+index 73217f71..8dbbf293 100644
+--- a/airdcpp-core/airdcpp/ZUtils.cpp
++++ b/airdcpp-core/airdcpp/ZUtils.cpp
+@@ -33,7 +33,7 @@ const double ZFilter::MIN_COMPRESSION_LEVEL = 0.9;
+ ZFilter::ZFilter() : totalIn(0), totalOut(0), compressing(true) {
+ memset(&zs, 0, sizeof(zs));
+
+- if(deflateInit(&zs, 3) != Z_OK) {
++ if(deflateInit(&zs, SETTING(MAX_COMPRESSION)) != Z_OK) {
+ throw Exception(STRING(COMPRESSION_ERROR));
+ }
+ }
+@@ -54,7 +54,8 @@ bool ZFilter::operator()(const void* in, size_t& insize, void* out, size_t& outs
+ if(compressing && insize > 0 && outsize > 16 && (totalIn > (64*1024)) && ((static_cast<double>(totalOut) / totalIn) > 0.95)) {
+ zs.avail_in = 0;
+ zs.avail_out = outsize;
+- if(deflateParams(&zs, 0, Z_DEFAULT_STRATEGY) != Z_OK) {
++ auto err = ::deflateParams(&zs, 0, Z_DEFAULT_STRATEGY);
++ if (err == Z_STREAM_ERROR) {
+ throw Exception(STRING(COMPRESSION_ERROR));
+ }
+ zs.avail_in = insize;