qlogging: Fix build on FreeBSD after 63cd16d.
pthread_getthreadid_np(3) is defined in pthread_np.h, not pthread.h. Additionally, it was added during the FreeBSD 9 time frame, so add a version check to use it only when we know it is present. Change-Id: I4d716d9bfb189d10128b6d458a47045e130b51e8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
b1220f7f73
commit
f99b3719f0
|
|
@ -103,8 +103,8 @@ static int qt_gettid()
|
|||
pthread_threadid_np(NULL, &tid);
|
||||
return tid;
|
||||
}
|
||||
#elif defined(Q_OS_FREEBSD_KERNEL)
|
||||
# include <pthread.h>
|
||||
#elif defined(Q_OS_FREEBSD_KERNEL) && defined(__FreeBSD_version) && __FreeBSD_version >= 900031
|
||||
# include <pthread_np.h>
|
||||
static int qt_gettid()
|
||||
{
|
||||
return pthread_getthreadid_np();
|
||||
|
|
|
|||
Loading…
Reference in New Issue