summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-11-05 12:18:10 -0800
committerJunio C Hamano <gitster@pobox.com>2015-11-05 12:18:10 -0800
commitc378862b1ec23dd526e318b4c1bfbf826f8dd6b6 (patch)
tree6d13aa024884af90d5aceea754fcbd28fe8a0bfe
parent3897d2d906df0edebd78b8d9604d02cd120bac36 (diff)
parent71d92575251bdb8b5e1b5b3a5c649bb63d9fc116 (diff)
downloadgit-c378862b1ec23dd526e318b4c1bfbf826f8dd6b6.tar.gz
Merge branch 'js/imap-send-curl-compilation-fix' into maint
"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
-rw-r--r--imap-send.c4
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)