From 9ae164eb837f7a9135fecca24b8c8e6528aef1b7 Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Thu, 23 May 2024 17:43:35 +0900 Subject: Fix to compare thread_id with `pthread_equal()` `pthread_t` is an opaque type, should not be compared with `==`. Signed-off-by: OBATA Akio --- src/kernel/qthread_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index 6a6f81b7f..be67e002d 100644 --- a/src/kernel/qthread_unix.cpp +++ b/src/kernel/qthread_unix.cpp @@ -483,7 +483,7 @@ bool TQThread::wait( unsigned long time ) { TQMutexLocker locker( d->mutex() ); - if ( d->thread_id == pthread_self() ) { + if ( pthread_equal( d->thread_id, pthread_self() ) ) { #ifdef QT_CHECK_STATE tqWarning( "TQThread::wait: thread tried to wait on itself" ); #endif // QT_CHECK_STATE -- cgit v1.2.1