diff options
| author | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-02-10 02:59:50 +0000 |
|---|---|---|
| committer | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-02-10 02:59:50 +0000 |
| commit | be26adb5b690b8691f393af3c3823e7f8763ea21 (patch) | |
| tree | d687e668fda830028739d49e2bc4157ad21d56db /lib/libc/net/getaddrinfo.c | |
| parent | 1344c9bdf6e874da9fa9a04c91230d817797351a (diff) | |
Notes
Diffstat (limited to 'lib/libc/net/getaddrinfo.c')
| -rw-r--r-- | lib/libc/net/getaddrinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 125ea694605f..8b6d6b725190 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -635,7 +635,9 @@ explore_numeric(pai, hostname, servname, res) return 0; flags = pai->ai_flags; - if (inet_pton(afd->a_af, hostname, pton) == 1) { + if ((afd->a_af == AF_INET + ? inet_aton(hostname, (struct in_addr *)pton) + : inet_pton(afd->a_af, hostname, pton)) == 1) { if (pai->ai_family == afd->a_af || pai->ai_family == PF_UNSPEC /*?*/) { GET_AI(cur->ai_next, afd, pton); |
