From 17db9ad18f4a5aa5e60f2eb15f0a9f990f76079d Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 6 May 2010 22:16:55 +0200 Subject: addes support for libcurl<7.19.1 --- plugins/lastfm/lastfm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/lastfm') 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); -- cgit v1.2.3