summaryrefslogtreecommitdiffhomepage
path: root/libbb/xconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xconnect.c')
-rw-r--r--libbb/xconnect.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index 6e78e6363..3a0dc2653 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);
}