diff --git a/main/utils.c b/main/utils.c index 7f74f40be9..928b89bc50 100644 --- a/main/utils.c +++ b/main/utils.c @@ -189,7 +189,9 @@ static int gethostbyname_r (const char *name, struct hostent *ret, char *buf, */ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp) { +#ifndef HAVE_GETHOSTBYNAME_R_5 int res; +#endif int herrno; int dots = 0; const char *s; @@ -199,7 +201,6 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp) integers, we break with tradition and refuse to look up a pure integer */ s = host; - res = 0; while (s && *s) { if (*s == '.') dots++;