1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-05 14:59:30 +00:00

Make use of gethostname() conditional on it being available

This commit is contained in:
Dan Fandrich
2008-11-28 22:41:14 +00:00
parent 36a6a6e175
commit 9c51eb28fc
3 changed files with 8 additions and 1 deletions

View File

@ -225,6 +225,7 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
We do this by determining our own domain name, then searching the string
for this domain name and removing it.
*/
#ifdef HAVE_GETHOSTNAME
if (niquery->flags & ARES_NI_NOFQDN)
{
char buf[255];
@ -237,6 +238,7 @@ static void nameinfo_callback(void *arg, int status, int timeouts, struct hosten
*end = 0;
}
}
#endif
niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, (char *)(host->h_name),
service);
return;