diff options
Diffstat (limited to 'plugins/lastfm')
-rw-r--r-- | plugins/lastfm/lastfm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c index 986bd03f..3ba8def8 100644 --- a/plugins/lastfm/lastfm.c +++ b/plugins/lastfm/lastfm.c @@ -160,8 +160,14 @@ curl_req_send (const char *req, const char *post) { const char *proxyuser = deadbeef->conf_get_str ("network.proxy.username", ""); const char *proxypass = deadbeef->conf_get_str ("network.proxy.password", ""); if (*proxyuser || *proxypass) { +#if LIBCURL_VERSION_MINOR >= 19 && LIBCURL_VERSION_PATCH >= 1 curl_easy_setopt (curl, CURLOPT_PROXYUSERNAME, proxyuser); curl_easy_setopt (curl, CURLOPT_PROXYUSERNAME, proxypass); +#else + char pwd[200]; + snprintf (pwd, sizeof (pwd), "%s:%s", proxyuser, proxypass); + curl_easy_setopt (curl, CURLOPT_PROXYUSERPWD, pwd); +#endif } } int status = curl_easy_perform(curl); |