From: Junio C Hamano Date: Tue, 19 Sep 2006 00:14:42 GMT Subject: Re: Patch for http-fetch.c and older curl releases Message-ID: <7vzmcwogp9.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20060918235753.GG1261@artsapartment.org> "Art Haas" writes: > Here's a patch that does that. I patched 'http.h' as there is already > a number of other curl tests in that file. On the machine where the > build was failing, the 'curl-config --vernum' returned '070908', > and on my home machine where things build without issue the same > command returns '070f05', so I took that value to do the comparison. > Perhaps an intermediate value would work as well, but I don't have > a suitable version to check. > > Signed-off-by: Art Haas > > diff --git a/http.h b/http.h > index 9ca16ac..aeff988 100644 > --- a/http.h > +++ b/http.h > @@ -22,6 +22,10 @@ #if LIBCURL_VERSION_NUM < 0x070c04 > #define NO_CURL_EASY_DUPHANDLE > #endif > > +#if LIBCURL_VERSION_NUM < 0x070f05 > +#define CURLE_HTTP_RETURNED_ERROR CURLE_HTTP_NOT_FOUND > +#endif > + > struct slot_results > { > CURLcode curl_result; > Eh, why not #ifndef CURLE_HTTP_RETURNED_ERROR #define CURLE_HTTP_RETURNED_ERROR CURLE_HTTP_NOT_FOUND #endif