summaryrefslogtreecommitdiff
path: root/libc/inet/ntop.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-09 21:20:20 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-09 21:20:20 +0000
commit8f6ad301913dc5ddfda7823510c17b8ce61df51c (patch)
tree5aa3f54536fdc7b42c9ae15836fb5c2a01f31cd2 /libc/inet/ntop.c
parent8df26e4f7bba3fb0f4c84df7c166fd5d5e09cf7b (diff)
A patch from Michal Moskal <malekith@pld.org.pl> to include
partial IPV6 support. This adds things like gethostbyname2(). Off by defaut, of course,
Diffstat (limited to 'libc/inet/ntop.c')
-rw-r--r--libc/inet/ntop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/inet/ntop.c b/libc/inet/ntop.c
index 6d7e691cc..521c1de63 100644
--- a/libc/inet/ntop.c
+++ b/libc/inet/ntop.c
@@ -29,6 +29,13 @@
#include <stdio.h>
#include <string.h>
+#ifdef __UCLIBC_HAS_IPV6__
+#define INET_IPV6
+#define SPRINTF(a) sprintf a
+#include <ctype.h>
+#endif
+
+
/*
* WARNING: Don't even consider trying to compile this on a system where
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
@@ -259,6 +266,7 @@ inet_pton6(src, dst)
int ch, saw_xdigit;
u_int val;
+
tp = memset(tmp, '\0', 16);
endp = tp + 16;
colonp = NULL;