summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-05-05 20:39:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-05 22:40:49 +0200
commit9922dafb23d26b5ad8229ea9c627c00badc53761 (patch)
treeb68a65cce036be00ade6d143a79578e8283d2a84 /tests/auto
parent31091808814de383aeec453933d2b29ce4eefb6f (diff)
Use sched_yield instead of pthread_yield
sched_yield is standardized and on linux pthread_yield is implemented as sched_yield. Building Qt for Android on OS X doesn't compile with the pthread version. Change-Id: I1913afa83769805291e987f55b8f452299a43dce Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
index e85c64db8e..881f2b5c7c 100644
--- a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
+++ b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
@@ -50,7 +50,7 @@
#include "qdebug.h"
#ifdef Q_OS_LINUX
-#include <pthread.h>
+#include <sched.h>
#endif
const QString qtest(qTableName("qtest", __FILE__, QSqlDatabase()));
@@ -159,7 +159,7 @@ public:
q.bindValue(2, 10);
QVERIFY_SQL(q, exec());
#ifdef Q_OS_LINUX
- pthread_yield();
+ sched_yield();
#endif
}
}
@@ -197,7 +197,7 @@ public:
q1.clear();
QVERIFY_SQL(q2, exec());
#ifdef Q_OS_LINUX
- pthread_yield();
+ sched_yield();
#endif
}
}