summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-95-text_fragments_utils-include.patch
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2021-10-14 19:01:18 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2021-10-14 19:01:18 -0400
commit846cdbdbf965fc50478bcc4c6436e3dc6a489f3f (patch)
tree4a39385c982291a110f513871aba340f0a7a061e /www-client/chromium/files/chromium-95-text_fragments_utils-include.patch
downloadppo-846cdbdbf965fc50478bcc4c6436e3dc6a489f3f.tar.xz
Initial commit.
Diffstat (limited to 'www-client/chromium/files/chromium-95-text_fragments_utils-include.patch')
-rw-r--r--www-client/chromium/files/chromium-95-text_fragments_utils-include.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-95-text_fragments_utils-include.patch b/www-client/chromium/files/chromium-95-text_fragments_utils-include.patch
new file mode 100644
index 0000000..e2d6160
--- /dev/null
+++ b/www-client/chromium/files/chromium-95-text_fragments_utils-include.patch
@@ -0,0 +1,37 @@
+From f48b39ee129132337b93e905c8f304c65766742a Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Tue, 31 Aug 2021 12:22:35 +0000
+Subject: [PATCH] IWYU: add string.h for strlen in text_fragments_utils
+
+Remove namespace std from strlen to avoid including cstring as well.
+---
+ .../shared_highlighting/core/common/text_fragments_utils.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/components/shared_highlighting/core/common/text_fragments_utils.cc b/components/shared_highlighting/core/common/text_fragments_utils.cc
+index 9f39ce6..389c09c 100644
+--- a/components/shared_highlighting/core/common/text_fragments_utils.cc
++++ b/components/shared_highlighting/core/common/text_fragments_utils.cc
+@@ -4,6 +4,8 @@
+
+ #include "components/shared_highlighting/core/common/text_fragments_utils.h"
+
++#include <string.h>
++
+ #include <sstream>
+
+ #include "base/json/json_writer.h"
+@@ -54,8 +56,8 @@ bool SplitUrlTextFragmentDirective(const std::string& full_url,
+
+ // We only want to keep what's after the delimiter.
+ *highlight_directive =
+- full_url.substr(pos + std::strlen(kFragmentsUrlDelimiter) +
+- std::strlen(kFragmentParameterName));
++ full_url.substr(pos + strlen(kFragmentsUrlDelimiter) +
++ strlen(kFragmentParameterName));
+ return true;
+ }
+
+--
+2.31.1
+