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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -85,3 +85,6 @@ inet_neta(src, dst, size)
|
||||
errno = EMSGSIZE;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
#undef inet_neta
|
||||
#pragma weak inet_neta=__inet_neta
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -102,3 +102,6 @@ again:
|
||||
}
|
||||
return (val);
|
||||
}
|
||||
|
||||
#undef inet_network
|
||||
#pragma weak inet_network=__inet_network
|
||||
|
||||
@@ -201,3 +201,6 @@ inet_ntop6(src, dst, size)
|
||||
strcpy(dst, tmp);
|
||||
return (dst);
|
||||
}
|
||||
|
||||
#undef inet_ntop
|
||||
#pragma weak inet_ntop=__inet_ntop
|
||||
|
||||
@@ -220,3 +220,6 @@ inet_pton6(src, dst)
|
||||
memcpy(dst, tmp, NS_IN6ADDRSZ);
|
||||
return (1);
|
||||
}
|
||||
|
||||
#undef inet_pton
|
||||
#pragma weak inet_pton=__inet_pton
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user