diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2015-10-26 14:14:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-26 13:10:30 -0700 |
commit | 71d92575251bdb8b5e1b5b3a5c649bb63d9fc116 (patch) | |
tree | 247e6109a106a1da35e55658a681a10e8f448a31 /imap-send.c | |
parent | a2558fb8e1e387b630312311e1d22c95663da5d0 (diff) | |
download | git-71d92575251bdb8b5e1b5b3a5c649bb63d9fc116.tar.gz |
imap-send: only use CURLOPT_LOGIN_OPTIONS if it is actually availablejs/imap-send-curl-compilation-fix
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'imap-send.c')
-rw-r--r-- | imap-send.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c index 37ac4aa86a..8c3fc212ba 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1422,11 +1422,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) |