aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/inet_addr.c3
-rw-r--r--resolv/inet_pton.c6
-rw-r--r--resolv/res_init.c4
3 files changed, 8 insertions, 5 deletions
diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c
index 144b87a74c..ee42093754 100644
--- a/resolv/inet_addr.c
+++ b/resolv/inet_addr.c
@@ -90,13 +90,14 @@ static const char rcsid[] = "$BINDId: inet_addr.c,v 8.11 1999/10/13 16:39:25 vix
* The value returned is in network order.
*/
in_addr_t
-inet_addr(const char *cp) {
+__inet_addr(const char *cp) {
struct in_addr val;
if (__inet_aton(cp, &val))
return (val.s_addr);
return (INADDR_NONE);
}
+weak_alias (__inet_addr, inet_addr)
/*
* Check whether "cp" is a valid ascii representation
diff --git a/resolv/inet_pton.c b/resolv/inet_pton.c
index c507013e4e..3d8819512e 100644
--- a/resolv/inet_pton.c
+++ b/resolv/inet_pton.c
@@ -49,7 +49,7 @@ static int inet_pton6 (const char *src, u_char *dst) internal_function;
* Paul Vixie, 1996.
*/
int
-inet_pton(af, src, dst)
+__inet_pton(af, src, dst)
int af;
const char *src;
void *dst;
@@ -65,7 +65,9 @@ inet_pton(af, src, dst)
}
/* NOTREACHED */
}
-libc_hidden_def (inet_pton)
+libc_hidden_def (__inet_pton)
+weak_alias (__inet_pton, inet_pton)
+libc_hidden_weak (inet_pton)
/* int
* inet_pton4(src, dst)
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 6eddcdd0b2..d492a08aee 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -324,7 +324,7 @@ __res_vinit(res_state statp, int preinit) {
if ((el = strchr(cp, SCOPE_DELIMITER)) != NULL)
*el = '\0';
if ((*cp != '\0') &&
- (inet_pton(AF_INET6, cp, &a6) > 0)) {
+ (__inet_pton(AF_INET6, cp, &a6) > 0)) {
struct sockaddr_in6 *sa6;
sa6 = malloc(sizeof(*sa6));
@@ -428,7 +428,7 @@ __res_vinit(res_state statp, int preinit) {
(void) fclose(fp);
}
if (__builtin_expect(statp->nscount == 0, 0)) {
- statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
+ statp->nsaddr.sin_addr = __inet_makeaddr(IN_LOOPBACKNET, 1);
statp->nsaddr.sin_family = AF_INET;
statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
statp->nscount = 1;