summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2015-10-26 13:14:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-26 20:10:30 (GMT)
commit71d92575251bdb8b5e1b5b3a5c649bb63d9fc116 (patch)
tree247e6109a106a1da35e55658a681a10e8f448a31 /imap-send.c
parenta2558fb8e1e387b630312311e1d22c95663da5d0 (diff)
downloadgit-71d92575251bdb8b5e1b5b3a5c649bb63d9fc116.zip
git-71d92575251bdb8b5e1b5b3a5c649bb63d9fc116.tar.gz
git-71d92575251bdb8b5e1b5b3a5c649bb63d9fc116.tar.bz2
imap-send: only use CURLOPT_LOGIN_OPTIONS if it is actually available
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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c
index 37ac4aa..8c3fc21 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)