summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2015-10-26 14:14:58 +0100
committerJunio C Hamano <gitster@pobox.com>2015-10-26 13:10:30 -0700
commit71d92575251bdb8b5e1b5b3a5c649bb63d9fc116 (patch)
tree247e6109a106a1da35e55658a681a10e8f448a31 /imap-send.c
parenta2558fb8e1e387b630312311e1d22c95663da5d0 (diff)
downloadgit-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.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)