Skip to content

Commit e88e424

Browse files
committed
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
2 parents 203501b + 71d9257 commit e88e424

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

imap-send.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,11 +1421,15 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
14211421
curl_easy_setopt(curl, CURLOPT_PORT, server.port);
14221422

14231423
if (server.auth_method) {
1424+
#if LIBCURL_VERSION_NUM < 0x072200
1425+
warning("No LOGIN_OPTIONS support in this cURL version");
1426+
#else
14241427
struct strbuf auth = STRBUF_INIT;
14251428
strbuf_addstr(&auth, "AUTH=");
14261429
strbuf_addstr(&auth, server.auth_method);
14271430
curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
14281431
strbuf_release(&auth);
1432+
#endif
14291433
}
14301434

14311435
if (!server.use_ssl)

0 commit comments

Comments
 (0)