The res_init.c changes bring us a bit closer to upstream too, though
there's still work to be done there. Some of the remaining differences
look like bugs we'd want to fix, so we should definitely try to come
back to that.
Change-Id: I50baa148e967c90d55d711e9904ad54c7d724d4d
These symbols should be public (and Firefox uses them), and we'd also probably
rather have the upstream thread-safe implementation.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1030899
Change-Id: I2a5888fbb3198546848398f576fd2195ff3fe00c
Occasionally file descriptors seem to be leaking across execs
from DNS related calls. Set close-on-execute for the various
sockets / file to prevent file descriptor leakage.
Change-Id: I4724b47bc7236f40c29518a6075598a9bba48b0a
Despite the name, most of resolv_private.h is actually in glibc; it's just
that there it's tucked away in libresolv whereas we have it in libc.
Change-Id: Ibcf6603f1141ffd2661cee0bffa83052d4f9e549
I couldn't work out where this went missing from "git log", but it became
important with the switch to hidden visibility.
Change-Id: I921f81e36642a2c65c3ec85dc9b5b87c5d977a5b
If libnetd_client can't be found, operate as before and use the default netId
potentially overriden by a more specific netId passed in to
android_get*fornet().
(cherry picked from commit 559c7842cc)
Change-Id: I42ef3293172651870fb46d2de22464c4f03e8e0b
Replace iface cache key with netid.
Replace _mark with netid.
Mark sockets used to test IPv4/IPv6 support as well as sockets
used to determine source address for rfc6724 sort.
Remove pid/uid mappings (functionality moved to system/netd).
Do not create resolv_cache when it does not exist, but rather only
when DNS configuration is supplied.
Clean up unused functions.
Change-Id: I9ccfda2902cc0943e87c9bc346ad9a2578accdab
There are only three users of bionic definition of ALIGN and keeping it
in sys/param.h polutes the namespace.
I inline the definition in the the three places that's used.
Bug: 13400663
Change-Id: I565008e8426c38ffb07422f42cd8e547d53044e9
The DNS copy of reentrant.h was unused, so remove it.
The strtod implementation can use the upstream-netbsd reentrant.h and
get a little closer to what was then upstream. (It's since been replaced
by gdtoa, and we'll have to follow at some point, but for now this doesn't
make anything any worse.)
ANDROID_CHANGES is (now) only used in the DNS code, so push the -D
down.
The <locale.h> change prevents an LP32 hack from leaking into LP64.
Change-Id: Idf30b98a59d7ca8f7c6cd6d07020b512057911ef
Also neuter __isthreaded.
We should come back to try to hide struct FILE's internals for LP64.
Bug: 3453512
Bug: 3453550
Change-Id: I7e115329fb4579246a72fea367b9fc8cb6055d18
Many compilers may optimize away the overflow check `msg + l < msg',
where `msg' is a pointer and `l' is an integer, because pointer
overflow is undefined behavior in C.
Use a safe precondition test `l >= eom - msg' instead.
Bug: 13219633
Change-Id: I3fca2125834073cc36d7e9c4e586e97842265a59
This is part of the upstream sync (Net/Open/Free BSDs expose the
nameser.h in their public headers).
Change-Id: Ib063d4e50586748cc70201a8296cd90d2e48bbcf