author | Benjamin Kramer <benny.kra@googlemail.com> | |
Fri, 24 Apr 2009 12:16:41 +0000 (14:16 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 25 Apr 2009 16:29:38 +0000 (09:29 -0700) | ||
commit | 785a9857496ae1b71b168f6d79306ca233ec0cd6 | |
tree | da380e42df7032933f59fe9c527a1a8887afdd11 | tree | snapshot |
parent | 911198f6c09e2a60451cf1a295ce4532ff11781c | commit | diff |
connect: replace inet_ntop with getnameinfo
inet_ntop is not protocol independent.
getnameinfo(3) is part of POSIX and is available when getaddrinfo(3) is.
This code is only compiled when NO_IPV6 isn't defined.
The old method was buggy anyway, not every ipv6 address was converted
properly because the buffer (addr) was too small.
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
inet_ntop is not protocol independent.
getnameinfo(3) is part of POSIX and is available when getaddrinfo(3) is.
This code is only compiled when NO_IPV6 isn't defined.
The old method was buggy anyway, not every ipv6 address was converted
properly because the buffer (addr) was too small.
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c | diff | blob | history |