Make more functions weak for native bridge
Test: CtsNetTestCases android.net.cts.DnsTest#testDnsWorks
Bug: 170665833
Change-Id: I83242e336f6ee5a0115252a12eddf9def26db90f
diff --git a/libc/dns/net/gethnamaddr.c b/libc/dns/net/gethnamaddr.c
index 7e18840..84942f8 100644
--- a/libc/dns/net/gethnamaddr.c
+++ b/libc/dns/net/gethnamaddr.c
@@ -90,6 +90,8 @@
#include "hostent.h"
+#include "private/bionic_defs.h"
+
#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
(ok)(nm) != 0)
#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
@@ -1533,6 +1535,7 @@
* Non-reentrant versions.
*/
+__BIONIC_WEAK_FOR_NATIVE_BRIDGE
struct hostent *
gethostbyname(const char *name)
{
@@ -1590,6 +1593,7 @@
return hp;
}
+__BIONIC_WEAK_FOR_NATIVE_BRIDGE
struct hostent *
gethostbyaddr(const void *addr, socklen_t len, int af)
{