Though some (or may be all?) posix thread-safe functions is available in Bionic, the toolchain always undefine _POSIX_THREAD_SAFE_FUNCTIONS. Because of this, software cannot rely, that thread-safe functions available and must use not-safe alternatives, which causes bugs.
Can you enable this define?