summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-02-09 13:20:39 -0500
committerBrad King <brad.king@kitware.com>2016-02-09 13:24:19 -0500
commit1ea55acf8aaa1a59b4453e4aec1fc704d7696321 (patch)
tree3edd7cb0fb6b5c9e801293a66572f29de40e5d7d
parenta5a5a6857241c21d306661d723b749839f4c6e1a (diff)
downloadcmake-1ea55acf8aaa1a59b4453e4aec1fc704d7696321.tar.gz
cmCurl: Fix compilation with system curl versions prior to 7.21.5
This version introduced CURLE_NOT_BUILT_IN which we have used since commit v3.4.0-rc1~211^2~4 (cmCurl: Tolerate lack of CURLOPT_CAPATH support, 2015-08-12). For older versions, just define the name to the then-unused error code so that we can compile.
-rw-r--r--Source/cmCurl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
index ad0c7d3e2d..4f3d89083f 100644
--- a/Source/cmCurl.cxx
+++ b/Source/cmCurl.cxx
@@ -12,6 +12,11 @@
#include "cmCurl.h"
#include "cmSystemTools.h"
+// curl versions before 7.21.5 did not provide this error code
+#if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505
+# define CURLE_NOT_BUILT_IN 4
+#endif
+
#define check_curl_result(result, errstr) \
if (result != CURLE_OK && result != CURLE_NOT_BUILT_IN) \
{ \