Skip to content

Commit 4246b0b

Browse files
Jojo-Schmitzgitster
authored andcommitted
http.c: don't use curl_easy_strerror prior to curl-7.12.0
Reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL where the function is not available. Signed-off-by: Joachim Schmitz <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fab4b04 commit 4246b0b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

http.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result, int target, int options)
806806
ret = HTTP_REAUTH;
807807
}
808808
} else {
809+
#if LIBCURL_VERSION_NUM >= 0x070c00
809810
if (!curl_errorstr[0])
810811
strlcpy(curl_errorstr,
811812
curl_easy_strerror(results.curl_result),
812813
sizeof(curl_errorstr));
814+
#endif
813815
ret = HTTP_ERROR;
814816
}
815817
} else {

0 commit comments

Comments
 (0)