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];
*end = 0;
}
}
+#endif
niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, (char *)(host->h_name),
service);
return;
*/
size_t len = 64;
int res;
+ channel->ndomains = 0; /* default to none */
+#ifdef HAVE_GETHOSTNAME
hostname = malloc(len);
if(!hostname) {
rc = ARES_ENOMEM;
} while(0);
- channel->ndomains = 0; /* default to none */
if (strchr(hostname, '.')) {
/* a dot was found */
}
channel->ndomains = 1;
}
+#endif
}
if (channel->nsort == -1) {
/* Define if you have the strnicmp function. */
#define HAVE_STRNICMP 1
+/* Define if you have the gethostname function. */
+#define HAVE_GETHOSTNAME 1
+
/* Define if you have the recv function. */
#define HAVE_RECV 1