From f99b3719f0b89842de82099215adea9a074e263f Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Wed, 28 Jan 2015 02:59:16 +0200 Subject: 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) --- src/corelib/global/qlogging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 6c545bb65f..2f3b5606f6 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -103,8 +103,8 @@ static int qt_gettid() pthread_threadid_np(NULL, &tid); return tid; } -#elif defined(Q_OS_FREEBSD_KERNEL) -# include +#elif defined(Q_OS_FREEBSD_KERNEL) && defined(__FreeBSD_version) && __FreeBSD_version >= 900031 +# include static int qt_gettid() { return pthread_getthreadid_np(); -- cgit v1.2.3