summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-29 01:27:06 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-30 00:30:06 +0300
commitb970fb01de5980bc4e5c6a51a961bdc6f0b0214f (patch)
treec0e8c8805abcf4fc988c44f1dfe5f704912a3670 /src/gui
parent5e4f92cc79c03fdf16628cdde6c03a807a4bb0d4 (diff)
downloadmv-b970fb01de5980bc4e5c6a51a961bdc6f0b0214f.tar.gz
mv-b970fb01de5980bc4e5c6a51a961bdc6f0b0214f.tar.bz2
mv-b970fb01de5980bc4e5c6a51a961bdc6f0b0214f.tar.xz
mv-b970fb01de5980bc4e5c6a51a961bdc6f0b0214f.zip
Fix compilation with old libcurl versions.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/whoisonline.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index b11b957c5..5b9fadb5d 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -73,6 +73,11 @@
#undef malloc
#endif // malloc
+#ifdef TMWA_SUPPORT
+#define CURLVERSION_ATLEAST(a, b, c) \
+ LIBCURL_VERSION_NUM >= ((a) * 0xffff + (b) * 0xff + c)
+#endif // TMWA_SUPPORT
+
WhoIsOnline *whoIsOnline = nullptr;
namespace
@@ -552,7 +557,10 @@ int WhoIsOnline::downloadThread(void *ptr)
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, ptr);
+
+#if CURLVERSION_ATLEAST(7, 10, 0)
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
+#endif // CURLVERSION_ATLEAST(7, 10, 0)
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 7);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 30);
Net::Download::addHeaders(curl);