This patch series adds qemu_strerror() function, which is thread-safe version of the libc strerror(). The first patch adds the qemu_strerror() funciton, and the second patch replaces strerror() function in linux-user/* with qemu_strerror() function.
Because it involves thread-safety, and the strerror_r() function called by qemu_strerror() has different type signatures between architectures because of historical reason, the implementation of qemu_strerror is a bit complicated. All tests except for skipped ones are passed in my environment (x86_64 linux). Yohei Kojima (2): util: Add thread-safe qemu_strerror() function linux-user: replace strerror() function to the thread safe qemu_strerror() include/qemu/cutils.h | 20 +++++++++++++++++++ linux-user/elfload.c | 4 ++-- linux-user/main.c | 4 ++-- linux-user/syscall.c | 2 +- util/cutils.c | 45 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 5 deletions(-) -- 2.39.2