diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2015-01-28 02:59:16 +0200 |
---|---|---|
committer | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2015-01-28 16:12:14 +0000 |
commit | f99b3719f0b89842de82099215adea9a074e263f (patch) | |
tree | d85bf29a3977f5d1b1e246cb1566498f7e7fd907 | |
parent | b1220f7f73ba78a11ba351dfec9852acb3e180ca (diff) |
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>
-rw-r--r-- | src/corelib/global/qlogging.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 <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(); |