[PATCH 1/6] Only use CURLOPT_LOGIN_OPTIONS if it is actually available
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 26, 2015, 13:14 UTC
- Message-ID
- <5693bb2d11ff096859d885d06b4ca860caf5e960.1445865176.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1445865176.git.johannes.schindelin@gmx.de>
This fixes the compilation on an older Linux that was used to debug test failures when upgrading Git for Windows to Git v2.3.0.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- imap-send.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/imap-send.c b/imap-send.c index e9faaea..4d3b773 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1421,11 +1421,15 @@ static CURL *setup_curl(struct imap_server_conf *srvc) curl_easy_setopt(curl, CURLOPT_PORT, server.port); if (server.auth_method) { +#if LIBCURL_VERSION_NUM < 0x072200 + warning("No LOGIN_OPTIONS support in this cURL version"); +#else struct strbuf auth = STRBUF_INIT; strbuf_addstr(&auth, "AUTH="); strbuf_addstr(&auth, server.auth_method); curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf); strbuf_release(&auth); +#endif } if (!server.use_ssl)
-- 2.1.4