platform_bionic/libc/upstream-netbsd
Elliott Hughes d0bbfa8327 Make res_init() work again.
Change 75830fb836 to fix _nres
initialization to be thread safe accidentally introduced a behavior
change whereby res_init() became a no-op. It also failed to remove all
direct accesses to _nres.

Move the file over to C++ so we can let RAII ensure we're always holding
a lock while using the global state, make all callers access the global
state via this class, and restore the previous behavior of res_init().

Test: atest DnsResolverTest
Bug: 166235340
Change-Id: Ib390a7eac063bc0ff5eeba755e8c74ef1383004e
2021-04-08 12:04:05 -07:00
..
android/include Make res_init() work again. 2021-04-08 12:04:05 -07:00
common/lib/libc Sync with upstream NetBSD. 2019-02-13 14:17:18 -08:00
lib/libc Reimplement our no-op utmp.h functions more simply. 2020-08-07 17:07:31 -07:00
.clang-format Fully disable clang format where needed. 2020-01-30 08:10:17 -08:00
README.md Move to .md files for even trivial documentation. 2017-01-07 12:47:28 -08:00

This directory contains upstream NetBSD source. You should not edit these files directly. Make fixes upstream and then pull down the new version of the file.

TODO: write a script to make this process automated.