Skip to content

Commit abd2075

Browse files
committed
chromium: Forward port musl patches to 95.0.4638.69
Add upstream backport for musl build fixes Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent 7f19768 commit abd2075

File tree

4 files changed

+65
-12
lines changed

4 files changed

+65
-12
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ SRC_URI:append:libc-musl = "\
5050
file://musl/0022-sys-stat.patch \
5151
file://musl/scoped-file.patch \
5252
file://musl/fix-narrowing-cast.patch \
53+
file://musl/chromium-95-quiche-include.patch \
54+
file://musl/fix-bits-stdint-intn-include.patch \
5355
"
5456

5557
ANY_OF_DISTRO_FEATURES = "opengl vulkan"

meta-chromium/recipes-browser/chromium/files/musl/0009-provide-res_ninit-and-nclose-APIs-on-non-glibc-linux.patch

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,38 @@ These APIs are not implemented on musl
88

99
Upstream-Status: Pending
1010
Signed-off-by: Khem Raj <raj.khem@gmail.com>
11-
---
11+
--- a/net/dns/dns_config_service_linux.cc
12+
+++ b/net/dns/dns_config_service_linux.cc
13+
@@ -414,12 +414,6 @@ class DnsConfigServiceLinux::ConfigReade
14+
base::ScopedBlockingCall scoped_blocking_call(
15+
FROM_HERE, base::BlockingType::MAY_BLOCK);
16+
17+
- std::unique_ptr<struct __res_state> res = resolv_reader_->GetResState();
18+
- if (res) {
19+
- dns_config_ = ConvertResStateToDnsConfig(*res.get());
20+
- resolv_reader_->CloseResState(res.get());
21+
- }
22+
-
23+
UMA_HISTOGRAM_BOOLEAN("Net.DNS.DnsConfig.Resolv.Read",
24+
dns_config_.has_value());
25+
if (!dns_config_.has_value())
1226
--- a/net/dns/dns_reloader.cc
1327
+++ b/net/dns/dns_reloader.cc
14-
@@ -4,8 +4,7 @@
28+
@@ -4,9 +4,8 @@
1529

1630
#include "net/dns/dns_reloader.h"
1731

1832
-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
1933
- !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
34+
-
2035
+#if defined(__GLIBC__)
21-
36+
+
2237
#include <resolv.h>
2338

39+
#include "base/lazy_instance.h"
2440
--- a/net/dns/host_resolver_manager.cc
2541
+++ b/net/dns/host_resolver_manager.cc
26-
@@ -2720,8 +2720,7 @@ HostResolverManager::HostResolverManager
42+
@@ -2902,8 +2902,7 @@ HostResolverManager::HostResolverManager
2743
NetworkChangeNotifier::AddConnectionTypeObserver(this);
2844
if (system_dns_config_notifier_)
2945
system_dns_config_notifier_->AddObserver(this);
@@ -45,12 +61,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
4561
DnsReloaderMaybeReload();
4662
#endif
4763
absl::optional<AddressInfo> ai;
48-
--- a/net/dns/dns_config_service_linux.cc
49-
+++ b/net/dns/dns_config_service_linux.cc
50-
@@ -486,20 +486,11 @@ class DnsConfigServiceLinux::ConfigReade
64+
--- a/net/dns/public/resolv_reader.cc
65+
+++ b/net/dns/public/resolv_reader.cc
66+
@@ -20,19 +20,10 @@
67+
namespace net {
5168

52-
std::unique_ptr<struct __res_state>
53-
DnsConfigServiceLinux::ResolvReader::GetResState() {
69+
std::unique_ptr<struct __res_state> ResolvReader::GetResState() {
5470
- auto res = std::make_unique<struct __res_state>();
5571
- memset(res.get(), 0, sizeof(struct __res_state));
5672
-
@@ -63,9 +79,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
6379
+ return nullptr;
6480
}
6581

66-
void DnsConfigServiceLinux::ResolvReader::CloseResState(
67-
struct __res_state* res) {
82+
void ResolvReader::CloseResState(struct __res_state* res) {
6883
- res_nclose(res);
6984
}
7085

71-
DnsConfigServiceLinux::DnsConfigServiceLinux()
86+
absl::optional<std::vector<IPEndPoint>> GetNameservers(
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From a9d986203bcfbaab84f270c1dc6c3abb4c450ee1 Mon Sep 17 00:00:00 2001
2+
From: Stephan Hartmann <stha09@googlemail.com>
3+
Date: Fri, 17 Sep 2021 14:57:33 +0000
4+
Subject: [PATCH] IWYU: add stddef.h for size_t in WindowManager
5+
6+
---
7+
net/third_party/quiche/src/http2/adapter/window_manager.h | 2 ++
8+
1 file changed, 2 insertions(+)
9+
10+
diff --git a/net/third_party/quiche/src/http2/adapter/window_manager.h b/net/third_party/quiche/src/http2/adapter/window_manager.h
11+
index f15982d..5a7701e 100644
12+
--- a/net/third_party/quiche/src/http2/adapter/window_manager.h
13+
+++ b/net/third_party/quiche/src/http2/adapter/window_manager.h
14+
@@ -1,6 +1,8 @@
15+
#ifndef QUICHE_HTTP2_ADAPTER_WINDOW_MANAGER_H_
16+
#define QUICHE_HTTP2_ADAPTER_WINDOW_MANAGER_H_
17+
18+
+#include <stddef.h>
19+
+
20+
#include <functional>
21+
22+
#include "common/platform/api/quiche_export.h"
23+
--
24+
2.32.0
25+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/ui/ozone/platform/wayland/host/wayland_window.cc.orig
2+
+++ b/ui/ozone/platform/wayland/host/wayland_window.cc
3+
@@ -4,7 +4,7 @@
4+
5+
#include "ui/ozone/platform/wayland/host/wayland_window.h"
6+
7+
-#include <bits/stdint-intn.h>
8+
+#include <stdint.h>
9+
#include <wayland-cursor.h>
10+
#include <algorithm>
11+
#include <memory>

0 commit comments

Comments
 (0)