summaryrefslogtreecommitdiff
path: root/libc/inet/getaddrinfo.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:29:53 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:29:53 +0000
commit11b9aee8ff8c9ab70ef6e5b6d68f75cd8a44c4d5 (patch)
tree40fa6c344cdb770bfb6edd104b41417fe6a8ba88 /libc/inet/getaddrinfo.c
parentab9d3f10ea97362d3c8ed875f2a721bf56c0f0ed (diff)
Again rpc ;-( , all *inet*, *addr*
Diffstat (limited to 'libc/inet/getaddrinfo.c')
-rw-r--r--libc/inet/getaddrinfo.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c
index e896e3449..2dd14d78f 100644
--- a/libc/inet/getaddrinfo.c
+++ b/libc/inet/getaddrinfo.c
@@ -48,6 +48,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define gethostbyname_r __gethostbyname_r
#define gethostbyname2_r __gethostbyname2_r
#define gethostbyaddr_r __gethostbyaddr_r
+#define inet_pton __inet_pton
+#define inet_ntop __inet_ntop
+#define strtoul __strtoul
#if 0
#define uname __uname
#define stpcpy __stpcpy
@@ -771,6 +774,20 @@ static struct gaih gaih[] =
{ PF_UNSPEC, NULL }
};
+void attribute_hidden
+__freeaddrinfo (struct addrinfo *ai)
+{
+ struct addrinfo *p;
+
+ while (ai != NULL)
+ {
+ p = ai;
+ ai = ai->ai_next;
+ free (p);
+ }
+}
+strong_alias(__freeaddrinfo,freeaddrinfo)
+
int attribute_hidden
__getaddrinfo (const char *name, const char *service,
const struct addrinfo *hints, struct addrinfo **pai)
@@ -842,7 +859,7 @@ __getaddrinfo (const char *name, const char *service,
continue;
if (p)
- freeaddrinfo (p);
+ __freeaddrinfo (p);
return -(i & GAIH_EAI);
}
@@ -866,21 +883,8 @@ __getaddrinfo (const char *name, const char *service,
return 0;
if (p)
- freeaddrinfo (p);
+ __freeaddrinfo (p);
return last_i ? -(last_i & GAIH_EAI) : EAI_NONAME;
}
strong_alias(__getaddrinfo,getaddrinfo)
-
-void
-freeaddrinfo (struct addrinfo *ai)
-{
- struct addrinfo *p;
-
- while (ai != NULL)
- {
- p = ai;
- ai = ai->ai_next;
- free (p);
- }
-}