*/
#include "setup.h"
#include <sys/types.h>
+#include <ctype.h>
#if defined(WIN32) && !defined(WATT32)
#include "nameser.h"
static void nameinfo_callback(void *arg, int status, struct hostent *host);
static char *lookup_service(unsigned short port, int flags, char *buf);
+#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
static char *append_scopeid(struct sockaddr_in6 *addr6, unsigned int scopeid, char *buf);
+#endif
static char *ares_striendstr(const char *s1, const char *s2);
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen,
*end = 0;
}
}
- callback(niquery->arg, ARES_SUCCESS, host->h_name, service);
+ niquery->callback(niquery->arg, ARES_SUCCESS, host->h_name, service);
return;
}
/* We couldn't find the host, but it's OK, we can use the IP */
else
service = lookup_service(niquery->addr.addr6.sin6_port, niquery->flags, srvbuf);
}
- callback(niquery->arg, ARES_SUCCESS, ipbuf, service);
+ niquery->callback(niquery->arg, ARES_SUCCESS, ipbuf, service);
return;
}
- callback(niquery->arg, status, NULL, NULL);
+ niquery->callback(niquery->arg, status, NULL, NULL);
free(niquery);
}
}
}
if (c2 == c1 == NULL)
- return c1_begin;
+ return (char *)c1_begin;
return NULL;
}