Skip to content

Commit b9ca6c6

Browse files
committed
Only use CURLOPT_LOGIN_OPTIONS if it is actually available
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 <[email protected]>
1 parent 1ead675 commit b9ca6c6

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

14161416
if (server.auth_method) {
1417+
#if LIBCURL_VERSION_NUM < 0x072200
1418+
warning("No LOGIN_OPTIONS support in this cURL version");
1419+
#else
14171420
struct strbuf auth = STRBUF_INIT;
14181421
strbuf_addstr(&auth, "AUTH=");
14191422
strbuf_addstr(&auth, server.auth_method);
14201423
curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
14211424
strbuf_release(&auth);
1425+
#endif
14221426
}
14231427

14241428
if (!server.use_ssl)

0 commit comments

Comments
 (0)