From: Emmanuel E. <ke...@ki...> - 2017-05-10 10:29:52
|
Hi Denis thank you for your patch, could you please make pull request here: https://github.com/openzim/zimwriterfs That would make the whole handling easier. Kind regards Emmanuel On 10.05.2017 12:10, Denis 'GNUtoo' Carikli wrote: > Without that fix we have: > kiwix-serve.cpp: In function ‘ssize_t callback_reader_from_blob(void*, uint64_t, char*, size_t)’: > kiwix-serve.cpp:244:53: error: no matching function for call to ‘min(size_t&, uint64_t)’ > size_t max_size_to_set = min(max, blob->size()-pos); > > Signed-off-by: Denis 'GNUtoo' Carikli <GN...@no...> > --- > src/server/kiwix-serve.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp > index a91511fb..874da11e 100644 > --- a/src/server/kiwix-serve.cpp > +++ b/src/server/kiwix-serve.cpp > @@ -241,7 +241,7 @@ ssize_t callback_reader_from_blob(void *cls, > { > zim::Blob* blob = static_cast<zim::Blob*>(cls); > pthread_mutex_lock(&readerLock); > - size_t max_size_to_set = min(max, blob->size()-pos); > + size_t max_size_to_set = min(max, (size_t)(blob->size()-pos)); > > if (max_size_to_set <= 0) > { > -- Kiwix - Wikipedia Offline & more * Web: http://www.kiwix.org * Twitter: https://twitter.com/KiwixOffline * more: http://www.kiwix.org/wiki/Communication |