diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2008-11-28 22:41:14 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2008-11-28 22:41:14 +0000 |
commit | 9c51eb28fce70126987f65edd5469fc748150040 (patch) | |
tree | b9f3ea23abde43b8fe44574a71c1b0bd43a3b594 /ares_getnameinfo.c | |
parent | 36a6a6e175d977856e16dd0d8b645ef9906bafe5 (diff) | |
download | c-ares-9c51eb28fce70126987f65edd5469fc748150040.tar.gz c-ares-9c51eb28fce70126987f65edd5469fc748150040.tar.bz2 c-ares-9c51eb28fce70126987f65edd5469fc748150040.zip |
Make use of gethostname() conditional on it being available
Diffstat (limited to 'ares_getnameinfo.c')
-rw-r--r-- | ares_getnameinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index 7bd4eca..c75e944 100644 --- a/ares_getnameinfo.c +++ b/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; |