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:
@ -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;
|
||||
|
Reference in New Issue
Block a user