Commit 785a985
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>1 parent 911198f commit 785a985
1 file changed
Lines changed: 4 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
190 | 183 | | |
191 | | - | |
| 184 | + | |
192 | 185 | | |
193 | 186 | | |
194 | 187 | | |
| |||
0 commit comments