fix can't find pthread_setname_np
Some checks failed
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 46s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m5s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Successful in 1m6s
linux-mips64-gcc / linux-gcc-mips64el (push) Successful in 1m15s
linux-x64-gcc / linux-gcc (push) Successful in 1m51s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 1m13s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Failing after 1m13s

This commit is contained in:
tqcq 2023-12-28 14:53:14 +08:00
parent b251f4a60e
commit 7f0131a9cb

View File

@ -39,8 +39,10 @@ public:
*impl->tid_ = GetTid();
#if __APPLE__
pthread_setname_np(impl->thread_name_.c_str());
#else
#elif ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12)))
pthread_setname_np(impl->thread_, impl->thread_name_.c_str());
#else
// TODO set thread name
#endif
impl->latch_.CountDown();