summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/0010-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2018-02-22 14:51:05 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2018-04-20 10:06:37 +0000
commitf33be06035faaa59cee17e5a97e82d079b4ab444 (patch)
tree79d1a995808932b7e9fae144e2b13ddb0b4908a2 /recipes-qt/qt5/qtwebengine/0010-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
parentc7549747b6e83e9630ae37c7e2595e41e4f1ebac (diff)
downloadmeta-qt5-f33be06035faaa59cee17e5a97e82d079b4ab444.tar.gz
qt5: upgrade to 5.11 Alpha
* use qtwebkit and qtwebkit-examples from dev branch, because there is no 5.11 branch (there isn't 5.10 as well, but because nobranch=1 in qt5-git.inc nobody noticed). * qtbase: drop qml-debug options removed from qtbase in: commit 525f8516c2580018f910cfb99ab5e0e36bd55ab1 Author: Ulf Hermann <ulf.hermann@qt.io> Date: Fri Oct 6 16:27:09 2017 +0200 Subject: Remove qml-debug configure flag and feature * qtgraphicaleffects, qtquickcontrols2, qtquickcontrols, qtvirtualkeyboard: add qtdeclarative-native dependency needed for qmlcachegen binary * qtwebkit: update LIC_FILES_CHKSUM and remove PACKAGECONFIGs referenced files disappered in: commit 6882a04fb36642862b11efe514251d32070c3d65 Author: Konstantin Tokarev <annulen@yandex.ru> Date: Thu Aug 25 19:20:41 2016 +0300 Subject: Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0010-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch')
-rw-r--r--recipes-qt/qt5/qtwebengine/0010-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0010-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/0010-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
new file mode 100644
index 00000000..032ff303
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/0010-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
@@ -0,0 +1,79 @@
1From b4cc182b9cc6b6362cf4039883e4e1953357843a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Jul 2017 15:27:50 -0700
4Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc
5 platforms
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 chromium/net/dns/dns_config_service_posix.cc | 4 ++++
10 chromium/net/dns/dns_reloader.cc | 4 ++++
11 chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++++++++++
12 3 files changed, 37 insertions(+)
13 create mode 100644 chromium/net/dns/resolv_compat.h
14
15diff --git a/chromium/net/dns/dns_config_service_posix.cc b/chromium/net/dns/dns_config_service_posix.cc
16index 8898f85..28530d5 100644
17--- a/chromium/net/dns/dns_config_service_posix.cc
18+++ b/chromium/net/dns/dns_config_service_posix.cc
19@@ -28,6 +28,10 @@
20 #include "net/dns/notify_watcher_mac.h"
21 #include "net/dns/serial_worker.h"
22
23+#if defined(OS_LINUX) && !defined(__GLIBC__)
24+#include "net/dns/resolv_compat.h"
25+#endif
26+
27 #if defined(OS_MACOSX) && !defined(OS_IOS)
28 #include "net/dns/dns_config_watcher_mac.h"
29 #endif
30diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc
31index 322c8a5..72ff40d 100644
32--- a/chromium/net/dns/dns_reloader.cc
33+++ b/chromium/net/dns/dns_reloader.cc
34@@ -9,6 +9,10 @@
35
36 #include <resolv.h>
37
38+#if defined(OS_LINUX) && !defined(__GLIBC__)
39+#include "net/dns/resolv_compat.h"
40+#endif
41+
42 #include "base/lazy_instance.h"
43 #include "base/logging.h"
44 #include "base/macros.h"
45diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h
46new file mode 100644
47index 0000000..4f0e852
48--- /dev/null
49+++ b/chromium/net/dns/resolv_compat.h
50@@ -0,0 +1,29 @@
51+#if !defined(__GLIBC__)
52+/***************************************************************************
53+ * resolv_compat.h
54+ *
55+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
56+ * Note: res_init() is actually deprecated according to
57+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
58+ **************************************************************************/
59+#include <string.h>
60+
61+static inline int res_ninit(res_state statp)
62+{
63+ int rc = res_init();
64+ if (statp != &_res) {
65+ memcpy(statp, &_res, sizeof(*statp));
66+ }
67+ return rc;
68+}
69+
70+static inline int res_nclose(res_state statp)
71+{
72+ if (!statp)
73+ return -1;
74+ if (statp != &_res) {
75+ memset(statp, 0, sizeof(*statp));
76+ }
77+ return 0;
78+}
79+#endif