Skip to content

Commit

Permalink
Update to new curl API for libcurl >= 7.85.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Jul 8, 2023
1 parent 5afbd78 commit aae37b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libscrobbler2.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* libscrobbler2.c
* Copyright (c) 2011-2021 Arkadiusz Bokowy
* Copyright (c) 2011-2023 Arkadiusz Bokowy
*
* This file is a part of cmusfm.
*
Expand Down Expand Up @@ -102,7 +102,10 @@ static CURL *sb_curl_init(CURLoption method, struct sb_response_data *response)
curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
#endif

#if LIBCURL_VERSION_NUM >= 0x071304 /* 7.19.4 */
#if LIBCURL_VERSION_NUM >= 0x075500 /* 7.85.0 */
curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,https");
curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS_STR, "http,https");
#elif LIBCURL_VERSION_NUM >= 0x071304 /* 7.19.4 */
curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
#endif
Expand Down

0 comments on commit aae37b7

Please sign in to comment.