{"thread":{"id":"31340","subject":"[PATCH v2] Don't use curl_easy_strerror prior to curl-7.12.0","startedAt":"2012-08-24T09:58:25Z","lastAt":"2012-08-24T09:58:25Z","messageCount":1,"participants":["Joachim Schmitz"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"197761","messageId":"003001cd81df$0158cf60$040a6e20$@schmitz-digital.de","threadId":"31340","inReplyTo":null,"subject":"[PATCH v2] Don't use curl_easy_strerror prior to curl-7.12.0","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-08-24T09:58:25Z","receivedAt":"2012-08-24T09:58:25Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"This reverts be22d92 (http: avoid empty error messages for some curl errors,\n2011-09-05) on platforms with older versions of libcURL.\n\nSigned-off-by: Joachim Schmitz <jojo@schmitz-digital.de>\n---\nResend, regardless that Junio said this not to be needed, as I don't see it applied yet.\nAlso tried to fix the formatting issues too, to practice submissions ;-)\n\n http.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/http.c b/http.c\nindex b61ac85..18bc6bf 100644\n--- a/http.c\n+++ b/http.c\n@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result, int target, int options)\n \t\t\t\tret = HTTP_REAUTH;\n \t\t\t}\n \t\t} else {\n+#if LIBCURL_VERSION_NUM >= 0x070c00\n \t\t\tif (!curl_errorstr[0])\n \t\t\t\tstrlcpy(curl_errorstr,\n \t\t\t\t\tcurl_easy_strerror(results.curl_result),\n \t\t\t\t\tsizeof(curl_errorstr));\n+#endif\n \t\t\tret = HTTP_ERROR;\n \t\t}\n \t} else {\n-- \n1.7.12\n"}]}