diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index 6a6f81b7..be67e002 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