From 7c6c79c4166811c9c05eabfc3733da763dd90780 Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Thu, 9 Aug 2007 12:24:33 +0000 Subject: [PATCH] build fix with libcurl 7.16 onwards svn path=/icecast/trunk/icecast/; revision=13495 --- src/auth_url.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/auth_url.c b/src/auth_url.c index c592485c..03d7922f 100644 --- a/src/auth_url.c +++ b/src/auth_url.c @@ -112,12 +112,14 @@ static void auth_url_clear(auth_t *self) } +#ifdef CURLOPT_PASSWDFUNCTION /* make sure that prompting at the console does not occur */ static int my_getpass(void *client, char *prompt, char *buffer, int buflen) { buffer[0] = '\0'; return 0; } +#endif static int handle_returned_header (void *ptr, size_t size, size_t nmemb, void *stream) @@ -518,7 +520,9 @@ int auth_get_url_auth (auth_t *authenticator, config_options_t *options) curl_easy_setopt (url_info->handle, CURLOPT_WRITEDATA, url_info->handle); curl_easy_setopt (url_info->handle, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt (url_info->handle, CURLOPT_TIMEOUT, 15L); +#ifdef CURLOPT_PASSWDFUNCTION curl_easy_setopt (url_info->handle, CURLOPT_PASSWDFUNCTION, my_getpass); +#endif curl_easy_setopt (url_info->handle, CURLOPT_ERRORBUFFER, &url_info->errormsg[0]); if (url_info->username && url_info->password)