aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4mm.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-01-21 10:55:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-21 12:32:58 +0100
commit24c43a5748b850203dd4711de43b92122e0f6cd5 (patch)
tree0ada08f0de3f9481cda69e606b023d1e47ceed2b /src/qml/jsruntime/qv4mm.cpp
parent1b53fb1b6f00fe6bef787d385dddc48d52b090c6 (diff)
Make compile on DragonFly BSD.
[ChangeLog][Platform Specific Changes][BSD] Fixed compile errors on DragonFly BSD and potentially FreeBSD. Task-number: QTBUG-35867 Change-Id: Iea90b93672c34f8a4b56e9afc4dbfb82cc993548 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4mm.cpp')
-rw-r--r--src/qml/jsruntime/qv4mm.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp
index 9923c8834c..1d6347b335 100644
--- a/src/qml/jsruntime/qv4mm.cpp
+++ b/src/qml/jsruntime/qv4mm.cpp
@@ -67,6 +67,10 @@
#include <sys/storage.h> // __tls()
#endif
+#if USE(PTHREADS) && HAVE(PTHREAD_NP_H)
+#include <pthread_np.h>
+#endif
+
QT_BEGIN_NAMESPACE
using namespace QV4;
@@ -234,7 +238,11 @@ MemoryManager::MemoryManager()
# else
void* stackBottom = 0;
pthread_attr_t attr;
+#if HAVE(PTHREAD_NP_H) && OS(FREEBSD)
+ if (pthread_attr_get_np(pthread_self(), &attr) == 0) {
+#else
if (pthread_getattr_np(pthread_self(), &attr) == 0) {
+#endif
size_t stackSize = 0;
pthread_attr_getstack(&attr, &stackBottom, &stackSize);
pthread_attr_destroy(&attr);