diff options
author | Sean Harmer <sean.harmer.qnx@kdab.com> | 2012-09-05 09:20:44 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-05 12:46:45 (GMT) |
commit | b6d1a35d6cb464f643d7905ec731069e729d4ad4 (patch) | |
tree | 6efee6d34021057513acac7f2e05d9c9204177bc /src/corelib/thread | |
parent | 341b813c75d0529f9220e4a10e804d3a7cfca6af (diff) | |
download | Qt-b6d1a35d6cb464f643d7905ec731069e729d4ad4.zip Qt-b6d1a35d6cb464f643d7905ec731069e729d4ad4.tar.gz Qt-b6d1a35d6cb464f643d7905ec731069e729d4ad4.tar.bz2 |
Allow compilation on OS X 10.5
Fixes regression introduced by
aa21fcac3672cc6f0dca064b34bbe02ca4f4def7
Change-Id: Iada496dd8fee390771d8fc12066e93ef086dee90
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Juhani Taipale <juhani.taipale@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index fa47d27..e4eeb6d 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -280,15 +280,16 @@ void QThreadPrivate::createEventDispatcher(QThreadData *data) #ifndef QT_NO_THREAD -#if (defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_QNX)) +#if (defined(Q_OS_LINUX) || (defined(Q_OS_MAC) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) || defined(Q_OS_QNX)) static void setCurrentThreadName(pthread_t threadId, const char *name) { # if defined(Q_OS_LINUX) && !defined(QT_LINUXBASE) Q_UNUSED(threadId); prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0); -# elif defined(Q_OS_MAC) +# elif (defined(Q_OS_MAC) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) Q_UNUSED(threadId); - pthread_setname_np(name); + if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) + pthread_setname_np(name); # elif defined(Q_OS_QNX) pthread_setname_np(threadId, name); # endif @@ -320,7 +321,7 @@ void *QThreadPrivate::start(void *arg) // ### TODO: allow the user to create a custom event dispatcher createEventDispatcher(data); -#if (defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_QNX)) +#if (defined(Q_OS_LINUX) || (defined(Q_OS_MAC) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) || defined(Q_OS_QNX)) // sets the name of the current thread. QString objectName = thr->objectName(); |