+2004-08-19 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Cast canon to (char *)
+ to avoid warning.
+
+ * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Initialize
+ status to NSS_STATUS_UNAVAIL.
+
+2004-08-19 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Use h->h_name in the
+ cannoname lookup since it has the FQDN even if the original NAME
+ value has not.
+
2004-08-18 Ulrich Drepper <drepper@redhat.com>
* sysdeps/posix/getaddrinfo.c (gaih_inet): Store NAME parameter
querybuf *buf;
unsigned char *ptr;
} ansp = { .ptr = buf };
- enum nss_status status;
+ enum nss_status status = NSS_STATUS_UNAVAIL;
int qtypes[] = { ns_t_a, ns_t_aaaa };
#define nqtypes (sizeof (qtypes) / sizeof (qtypes[0]))
if (at->family == AF_UNSPEC && (req->ai_flags & AI_NUMERICHOST) == 0)
{
- struct hostent *h;
+ struct hostent *h = NULL;
struct gaih_addrtuple **pat = &at;
int no_data = 0;
int no_inet6_data = 0;
char *buf = alloca (max_fqdn_len);
char *s;
- if (DL_CALL_FCT (cfct, (name, buf, max_fqdn_len,
- &s, &rc, &herrno))
+ if (DL_CALL_FCT (cfct, (h->h_name ?: name, buf,
+ max_fqdn_len, &s, &rc,
+ &herrno))
== NSS_STATUS_SUCCESS)
canon = s;
else
(*pai)->ai_addr = (void *) (*pai + 1);
/* We only add the canonical name once. */
- (*pai)->ai_canonname = canon;
+ (*pai)->ai_canonname = (char *) canon;
canon = NULL;
#if SALEN