Skip to content

Commit c378862

Browse files
committed
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
2 parents 3897d2d + 71d9257 commit c378862

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
@@ -1422,11 +1422,15 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
14221422
curl_easy_setopt(curl, CURLOPT_PORT, server.port);
14231423

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

14321436
if (!server.use_ssl)

0 commit comments

Comments
 (0)