diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xconnect.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c index 6e78e63..3a0dc26 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c @@ -496,12 +496,15 @@ char* FAST_FUNC xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa) { return sockaddr2str(sa, NI_NAMEREQD | IGNORE_PORT); } +#ifndef NI_NUMERICSCOPE +# define NI_NUMERICSCOPE 0 +#endif char* FAST_FUNC xmalloc_sockaddr2dotted(const struct sockaddr *sa) { - return sockaddr2str(sa, NI_NUMERICHOST); + return sockaddr2str(sa, NI_NUMERICHOST | NI_NUMERICSCOPE); } char* FAST_FUNC xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa) { - return sockaddr2str(sa, NI_NUMERICHOST | IGNORE_PORT); + return sockaddr2str(sa, NI_NUMERICHOST | NI_NUMERICSCOPE | IGNORE_PORT); } |