diff options
author | Louis Sautier <sautier.louis@gmail.com> | 2017-01-25 21:38:05 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-01-26 23:38:59 +0100 |
commit | 32d49f7d930a0112b5281ebb75e4fdb5c2cd9275 (patch) | |
tree | ed4dd76f795d975af45f5316847e025b7c63a93c /net-p2p/airdcpp-webclient/files | |
parent | net-proxy/dante: remove unused patches (diff) | |
download | gentoo-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.patch | 23 |
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 000000000000..ad5a379c201a --- /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; |