Make weak symbols for all those inet_*() functions declared in

<arpa/inet.h>. Since they are renamed to __inet_*() by means of macros
(why anyway?), the functions won't be found e.g. by configure scripts
not including the header. Makes OpenSSH even more happy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24646 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-03-29 12:41:04 +00:00
parent 313cc8a872
commit 6287376408
13 changed files with 40 additions and 1 deletions
+2 -1
View File
@@ -206,5 +206,6 @@ inet_aton(const char *cp, struct in_addr *addr) {
}
#undef inet_addr
#undef inet_aton
#pragma weak inet_addr=__inet_addr
#pragma weak inet_aton=__inet_aton
@@ -257,3 +257,6 @@ inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) {
strcpy(dst, tmp);
return (dst);
}
#undef inet_cidr_ntop
#pragma weak inet_cidr_ntop=__inet_cidr_ntop
@@ -273,3 +273,6 @@ getbits(const char *src, int ipv6) {
return (bits);
}
#undef inet_cidr_pton
#pragma weak inet_cidr_pton=__inet_cidr_pton
+3
View File
@@ -61,3 +61,6 @@ inet_lnaof(in)
else
return ((i)&IN_CLASSC_HOST);
}
#undef inet_lnaof
#pragma weak inet_lnaof=__inet_lnaof
@@ -64,3 +64,6 @@ inet_makeaddr(net, host)
a.s_addr = htonl(a.s_addr);
return (a);
}
#undef inet_makeaddr
#pragma weak inet_makeaddr=__inet_makeaddr
@@ -275,3 +275,6 @@ emsgsize:
errno = EMSGSIZE;
return (NULL);
}
#undef inet_net_ntop
#pragma weak inet_net_ntop=__inet_net_ntop
@@ -403,3 +403,6 @@ inet_net_pton(int af, const char *src, void *dst, size_t size) {
return (-1);
}
}
#undef inet_net_pton
#pragma weak inet_net_pton=__inet_net_pton
+3
View File
@@ -85,3 +85,6 @@ inet_neta(src, dst, size)
errno = EMSGSIZE;
return (NULL);
}
#undef inet_neta
#pragma weak inet_neta=__inet_neta
+3
View File
@@ -60,3 +60,6 @@ inet_netof(in)
else
return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
}
#undef inet_netof
#pragma weak inet_netof=__inet_netof
+3
View File
@@ -102,3 +102,6 @@ again:
}
return (val);
}
#undef inet_network
#pragma weak inet_network=__inet_network
+3
View File
@@ -201,3 +201,6 @@ inet_ntop6(src, dst, size)
strcpy(dst, tmp);
return (dst);
}
#undef inet_ntop
#pragma weak inet_ntop=__inet_ntop
+3
View File
@@ -220,3 +220,6 @@ inet_pton6(src, dst)
memcpy(dst, tmp, NS_IN6ADDRSZ);
return (1);
}
#undef inet_pton
#pragma weak inet_pton=__inet_pton
+5
View File
@@ -106,3 +106,8 @@ inet_nsap_ntoa(int binlen, const u_char *binary, char *ascii) {
*ascii = '\0';
return (start);
}
#undef inet_nsap_addr
#undef inet_nsap_ntoa
#pragma weak inet_nsap_addr=__inet_nsap_addr
#pragma weak inet_nsap_ntoa=__inet_nsap_ntoa