[PATCH 7/7] Do not use curl_easy_strerror with curl < 7.12.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 17966c0a added an unguarded use of curl_easy_strerror.
This adds a guard so it is not used with curl < 7.12.0.

Signed-off-by: Tom G. Christensen <tgc@xxxxxxxxxxxxxxx>
---
 http.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/http.c b/http.c
index a46ab23af..104caaa75 100644
--- a/http.c
+++ b/http.c
@@ -2116,8 +2116,12 @@ static size_t fwrite_sha1_file(char *ptr, size_t eltsize, size_t nmemb,
 		CURLcode c = curl_easy_getinfo(slot->curl, CURLINFO_HTTP_CODE,
 						&slot->http_code);
 		if (c != CURLE_OK)
+#if LIBCURL_VERSION_NUM >= 0x070c00
 			die("BUG: curl_easy_getinfo for HTTP code failed: %s",
 				curl_easy_strerror(c));
+#else
+			die("BUG: curl_easy_getinfo for HTTP code failed");
+#endif
 		if (slot->http_code >= 300)
 			return size;
 	}
-- 
2.12.2




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]