Bug#905596: qtwebengine-opensource-src: build error with libicu-dev from stable
Source: qtwebengine-opensource-src
Version: 5.11.1+dfsg-5
Severity: normal
Hi,
when building the package on stable (plus various backports), I got the
following error:
--------------
../../3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc: In member function 'bool url_formatter::IDNSpoofChecker::SimilarToTopDomains(base::StringPiece16)':
../../3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc:321:42: error: invalid conversion from 'UChar* {aka short unsigned int*}' to 'char16_t*' [-fpermissive]
char16_t* buffer = host_alt.getBuffer(-1);
~~~~~~~~~~~~~~~~~~^~~~
--------------
Between icu versions 57 (stable) and 60 (testing/unstable), there was a
change in the data type returned by the getBuffer method of
icu::UnicodeString.
This can either be fixed with the attached patch (note that a similar
reinterpret_cast<>() as introduced by the patch is done in a bunch of
other places within chromium where icu::UnicodeString is used), or you
should bump the libicu-dev build dependency to (>= 59), as icu 59 was
the upstream version that introduced the change.
Regards,
Andreas Ferber
--- a/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc
+++ b/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc
@@ -318,7 +318,7 @@
if ((u04cf_pos = host.indexOf(0x4CF)) != -1) {
icu::UnicodeString host_alt(host);
size_t length = host_alt.length();
- char16_t* buffer = host_alt.getBuffer(-1);
+ char16_t* buffer = reinterpret_cast<char16_t*>(host_alt.getBuffer(-1));
for (char16_t* uc = buffer + u04cf_pos ; uc < buffer + length; ++uc) {
if (*uc == 0x4CF)
*uc = 0x6C; // Lowercase L
Reply to: