1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +00:00

Fix "rhost undeclared" (sf.net #3466456)

patch by Jaromír Cápík
This commit is contained in:
Pavel Labath 2012-01-03 10:36:43 +01:00
parent 3c82e6bd3d
commit 9df83969e7

View File

@ -240,7 +240,7 @@ static int mpd_connect(mpd_Connection *connection, const char *host, int port,
return uds_connect(connection, host, timeout);
#ifdef HAVE_GETHOSTBYNAME_R
if (gethostbyname_r(rhost, &he, hostbuff, sizeof(hostbuff), &he_res, &he_errno)) { // get the host info
if (gethostbyname_r(host, &he, hostbuff, sizeof(hostbuff), &he_res, &he_errno)) { // get the host info
snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH,
"%s ('%s')", hstrerror(h_errno), host);
connection->error = MPD_ERROR_UNKHOST;