aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-05 21:42:53 +0100
committerEugene Sandulenko2019-11-05 21:42:53 +0100
commit1584c3641069cbb0caa0d7c321ae9fcc76226ab2 (patch)
tree90cb82f248a6c718c8cadd55670fcb49295d2312 /backends/networking
parent11a72ca928e1294c2dd23bd0ed0a675094f0fd8d (diff)
downloadscummvm-rg350-1584c3641069cbb0caa0d7c321ae9fcc76226ab2.tar.gz
scummvm-rg350-1584c3641069cbb0caa0d7c321ae9fcc76226ab2.tar.bz2
scummvm-rg350-1584c3641069cbb0caa0d7c321ae9fcc76226ab2.zip
NETWORKING: Fix compilation for lower versions of libcurl
Diffstat (limited to 'backends/networking')
-rw-r--r--backends/networking/curl/networkreadstream.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp
index 06f4dc52a8..09b9d80c67 100644
--- a/backends/networking/curl/networkreadstream.cpp
+++ b/backends/networking/curl/networkreadstream.cpp
@@ -108,11 +108,14 @@ void NetworkReadStream::initCurl(const char *url, curl_slist *headersList) {
curl_easy_setopt(_easy, CURLOPT_XFERINFODATA, this);
#endif
+#if LIBCURL_VERSION_NUM >= 0x071900
+ // Added in libcurl 7.25.0
if (_keepAlive) {
curl_easy_setopt(_easy, CURLOPT_TCP_KEEPALIVE, 1L);
curl_easy_setopt(_easy, CURLOPT_TCP_KEEPIDLE, _keepAliveIdle);
curl_easy_setopt(_easy, CURLOPT_TCP_KEEPINTVL, _keepAliveInterval);
}
+#endif
}
bool NetworkReadStream::reuseCurl(const char *url, curl_slist *headersList) {
@@ -212,7 +215,7 @@ bool NetworkReadStream::reuse(const char *url, curl_slist *headersList, Common::
if (!reuseCurl(url, headersList))
return false;
- _backingStream = Common::MemoryReadWriteStream(DisposeAfterUse::YES);
+ _backingStream = Common::MemoryReadWriteStream(DisposeAfterUse::YES);
setupBufferContents((const byte *)postFields.c_str(), postFields.size(), uploading, usingPatch, false);
return true;
}
@@ -231,7 +234,7 @@ bool NetworkReadStream::reuse(const char *url, curl_slist *headersList, const by
return false;
_backingStream = Common::MemoryReadWriteStream(DisposeAfterUse::YES);
- setupBufferContents(buffer, bufferSize, uploading, usingPatch, post);
+ setupBufferContents(buffer, bufferSize, uploading, usingPatch, post);
return true;
}