提交 01207d0b 编写于 作者: J Jan Kiszka 提交者: Peter Maydell

qemu-thread-posix: Fix build against older glibc version

pthread_setname_np was introduced with 2.12.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 0ca540db
......@@ -420,7 +420,7 @@ void qemu_thread_create(QemuThread *thread, const char *name,
if (err)
error_exit(err, __func__);
#ifdef _GNU_SOURCE
#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
if (name_threads) {
pthread_setname_np(thread->thread, name);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册