summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2017-06-09 09:34:09 +0300
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-20 19:30:05 +0200
commit969f1f80bf255498abbec6886d443670c20a79c8 (patch)
tree45a65f19da61868c2fe71669fb4b7d29b374edac /recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch
parent648f7b0a2eb202d4378ce50ae566b6ca450dd010 (diff)
downloadmeta-qt5-969f1f80bf255498abbec6886d443670c20a79c8.tar.gz
Upgrade to Qt 5.9.0
* adapt QtWebEngine recipe to use GN instead of GYP * add QtRemoteObjects and QtWebView as a new Qt modules * update available QtBase configure arguments * remove obsolete patches * patch all .pc files to remove build paths * include generated QML cache files in packages * the patch "configure paths for target qmake properly" could not be applied anymore and support must be done differently * QtWebEngine now requires gcc-multilib to be installed on the host system, because the host tools are built to the same bitness as the target (arm -> x86, aarch64 -> x86-64) * refresh the patches to match with b5.9* branches on: https://github.com/meta-qt5/qtbase https://github.com/meta-qt5/qtwebengine and 56-based branch on https://github.com/meta-qt5/qtwebengine-chromium Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch')
-rw-r--r--recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch b/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch
new file mode 100644
index 00000000..678de529
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch
@@ -0,0 +1,60 @@
1From 41d7028d2239a98a76cc91939edb2cb728019d08 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 27 Jul 2017 08:02:51 -0700
4Subject: [PATCH] Replace pthread_yield with sched_yield
5
6On Linux pthead_yield is same as sched_yield implementation wise
7and sched_yield is available on all libc
8implementations on Linux
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 4 ++--
13 tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp | 5 +++--
14 2 files changed, 5 insertions(+), 4 deletions(-)
15
16diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
17index b6106e8c9e..6d6ea0b739 100644
18--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
19+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
20@@ -34,7 +34,7 @@
21 #include "tst_qvariant_common.h"
22
23 #ifdef Q_OS_LINUX
24-# include <pthread.h>
25+# include <sched.h>
26 #endif
27
28 #include <algorithm>
29@@ -197,7 +197,7 @@ protected:
30 const char *nm = name.constData();
31 int tp = qRegisterMetaType<Bar>(nm);
32 #if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
33- pthread_yield();
34+ sched_yield();
35 #endif
36 QMetaType info(tp);
37 if (!info.isValid()) {
38diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
39index 7340817ade..f34162a105 100644
40--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
41+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
42@@ -77,6 +77,7 @@
43 #include <stdlib.h>
44 #include <sys/stat.h>
45 #include <unistd.h>
46+#include <sched.h>
47 #endif
48
49 #include "private/qhostinfo_p.h"
50@@ -2131,8 +2132,8 @@ public slots:
51
52 #if defined(Q_OS_MAC)
53 pthread_yield_np();
54-#elif defined Q_OS_LINUX && !defined Q_OS_ANDROID
55- pthread_yield();
56+#elif defined Q_OS_LINUX
57+ sched_yield();
58 #endif
59 if (!sock->waitForConnected()) {
60 networkTimeout = true;