mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
NetBSD build fix
apparently the signature of pthread_setname_np() is different than the one documented in the Linux man page for it: https://man7.org/linux/man-pages/man3/pthread_setname_np.3.html https://man.netbsd.org/pthread_setname_np.3 Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1863cec279
commit
5ad718cb25
1 changed files with 2 additions and 0 deletions
|
@ -209,6 +209,8 @@ void *QThreadPrivate::start(void *arg)
|
||||||
objectName = thr->metaObject()->className();
|
objectName = thr->metaObject()->className();
|
||||||
#if defined(QT_HAVE_PRCTL)
|
#if defined(QT_HAVE_PRCTL)
|
||||||
::prctl(PR_SET_NAME, (unsigned long)objectName.toLocal8Bit().constData(), 0, 0, 0);
|
::prctl(PR_SET_NAME, (unsigned long)objectName.toLocal8Bit().constData(), 0, 0, 0);
|
||||||
|
#elif defined(QT_HAVE_PTHREAD_SETNAME_NP) && defined(Q_OS_NETBSD)
|
||||||
|
pthread_setname_np(thr->d_func()->thread_id, objectName.toLocal8Bit().constData(), (char*)"%s");
|
||||||
#elif defined(QT_HAVE_PTHREAD_SETNAME_NP)
|
#elif defined(QT_HAVE_PTHREAD_SETNAME_NP)
|
||||||
pthread_setname_np(thr->d_func()->thread_id, objectName.toLocal8Bit().constData());
|
pthread_setname_np(thr->d_func()->thread_id, objectName.toLocal8Bit().constData());
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue