Complete <netdb.h>.
Add all the missing <netdb.h> functions.
Also fix getservbyport to handle a null protocol correctly.
Also fix getservbyname/getservbyport to not interfere with getservent.
Also fix endservent to reset getservent iteration.
Also reduce unnecessary differences from upstream NetBSD sethostent.c.
The servent implementation is still horrific, and we should
probably support protoent too so that debugging tools can use
getprotobyname/getprotobynumber.
Bug: N/A
Test: ran tests
Change-Id: I639108c46df0a768af297cf3bbce857cb1bef9d9
diff --git a/libc/libc.arm.map b/libc/libc.arm.map
index 08ba59f..82d6872 100644
--- a/libc/libc.arm.map
+++ b/libc/libc.arm.map
@@ -1322,7 +1322,12 @@
global:
__freading;
__fwriting;
+ endhostent;
+ endnetent;
+ endprotoent;
getentropy;
+ getnetent;
+ getprotoent;
getrandom;
getlogin_r;
glob;
@@ -1357,6 +1362,9 @@
posix_spawn_file_actions_destroy;
posix_spawn_file_actions_init;
posix_spawnp;
+ sethostent;
+ setnetent;
+ setprotoent;
syncfs;
} LIBC_O;