summaryrefslogtreecommitdiff
path: root/ares/ares_getnameinfo.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-11-28 22:41:14 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-11-28 22:41:14 +0000
commite4dabef0c77cd07b96dad4a3af226acdc6f5f682 (patch)
tree1eaeceaf84a1435cb74cedd3f15b51aed63e5b41 /ares/ares_getnameinfo.c
parent00142d8443325a0ea48befc6c0347a065a67f1e0 (diff)
downloadcurl-e4dabef0c77cd07b96dad4a3af226acdc6f5f682.tar.gz
Make use of gethostname() conditional on it being available
Diffstat (limited to 'ares/ares_getnameinfo.c')
-rw-r--r--ares/ares_getnameinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c
index 7bd4eca8a..c75e94468 100644
--- a/ares/ares_getnameinfo.c
+++ b/ares/ares_getnameinfo.c
@@ -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;