summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-30 20:06:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-30 20:06:58 (GMT)
commite88e424f4c9d9c8b622cc6a2ebe6e1fa058676f5 (patch)
treefe1249a60fd0a49c541b1f478980f1afe766cfc3 /imap-send.c
parent203501b39fe89193c252ec651d4bf1fafd784b30 (diff)
parent71d92575251bdb8b5e1b5b3a5c649bb63d9fc116 (diff)
downloadgit-e88e424f4c9d9c8b622cc6a2ebe6e1fa058676f5.zip
git-e88e424f4c9d9c8b622cc6a2ebe6e1fa058676f5.tar.gz
git-e88e424f4c9d9c8b622cc6a2ebe6e1fa058676f5.tar.bz2
Merge branch 'js/imap-send-curl-compilation-fix'
"git imap-send" did not compile well with older version of cURL library. * js/imap-send-curl-compilation-fix: imap-send: only use CURLOPT_LOGIN_OPTIONS if it is actually available
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 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)