aboutsummaryrefslogtreecommitdiff
blob: 8e171bbfd6848b3e72056d83eb9356705f747a67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
diff -Naur qtwebengine-opensource-src-5.6.1.orig/src/3rdparty/chromium/net/base/dns_reloader.cc qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/net/base/dns_reloader.cc
--- qtwebengine-opensource-src-5.6.1.orig/src/3rdparty/chromium/net/base/dns_reloader.cc	2016-07-28 17:16:00.113559841 -0700
+++ qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/net/base/dns_reloader.cc	2016-07-28 17:41:45.640212588 -0700
@@ -8,6 +8,9 @@
     !defined(OS_ANDROID)
 
 #include <resolv.h>
+#if defined(OS_LINUX) && !defined(__GLIBC__)
+#include "net/dns/resolv_compat.h"
+#endif
 
 #include "base/basictypes.h"
 #include "base/lazy_instance.h"
diff -Naur qtwebengine-opensource-src-5.6.1.orig/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc
--- qtwebengine-opensource-src-5.6.1.orig/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc	2016-07-28 17:16:00.187560625 -0700
+++ qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc	2016-07-28 17:41:45.640212588 -0700
@@ -25,6 +25,10 @@
 #include "net/dns/notify_watcher_mac.h"
 #include "net/dns/serial_worker.h"
 
+#if defined(OS_LINUX) && !defined(__GLIBC__)
+#include "net/dns/resolv_compat.h"
+#endif
+
 #if defined(OS_MACOSX) && !defined(OS_IOS)
 #include "net/dns/dns_config_watcher_mac.h"
 #endif
diff -Naur qtwebengine-opensource-src-5.6.1.orig/src/3rdparty/chromium/net/dns/resolv_compat.h qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/net/dns/resolv_compat.h
--- qtwebengine-opensource-src-5.6.1.orig/src/3rdparty/chromium/net/dns/resolv_compat.h	1969-12-31 16:00:00.000000000 -0800
+++ qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/net/dns/resolv_compat.h	2016-07-28 17:43:07.714089231 -0700
@@ -0,0 +1,29 @@
+#if !defined(__GLIBC__)
+/***************************************************************************
+ * resolv_compat.h
+ *
+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
+ * Note: res_init() is actually deprecated according to
+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
+ **************************************************************************/
+#include <string.h>
+
+static inline int res_ninit(res_state statp)
+{
+	int rc = res_init();
+	if (statp != &_res) {
+		memcpy(statp, &_res, sizeof(*statp));
+	}
+	return rc;
+}
+
+static inline int res_nclose(res_state statp)
+{
+	if (!statp)
+		return -1;
+	if (statp != &_res) {
+		memset(statp, 0, sizeof(*statp));
+	}
+	return 0;
+}
+#endif