git: 7a9feac1998a - 2023Q3 - www/*chromium: unbreak build on 12.4; no MFD_CLOEXEC support
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Aug 2023 14:54:03 UTC
The branch 2023Q3 has been updated by rnagy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7a9feac1998a9d86166a1b80c3ff386922e6f6b5
commit 7a9feac1998a9d86166a1b80c3ff386922e6f6b5
Author: Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2023-08-24 14:52:10 +0000
Commit: Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2023-08-24 14:53:59 +0000
www/*chromium: unbreak build on 12.4; no MFD_CLOEXEC support
PR: 273310
(cherry picked from commit ffba5c0cb30d6daf257013be5293a41db703589c)
---
...rm_wayland_host_zwp__text__input__wrapper__v1.cc | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/www/chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc b/www/chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
new file mode 100644
index 000000000000..133c15793cc2
--- /dev/null
+++ b/www/chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
@@ -0,0 +1,21 @@
+--- ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.orig 2023-08-24 14:51:50 UTC
++++ ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
+@@ -224,6 +224,10 @@ void ZWPTextInputWrapperV1::SetSurroundingText(
+ // so if it exceeds 16 bits, it may be broken.
+ static constexpr size_t kSizeLimit = 60000;
+ if (HasAdvancedSurroundingTextSupport() && text.length() > kSizeLimit) {
++#if defined(__FreeBSD_version) && __FreeBSD_version < 1300048
++ PLOG(ERROR) << "memfd is not supported";
++ return;
++#else
+ base::ScopedFD memfd(memfd_create("surrounding_text", MFD_CLOEXEC));
+ if (!memfd.get()) {
+ PLOG(ERROR) << "Failed to create memfd";
+@@ -236,6 +240,7 @@ void ZWPTextInputWrapperV1::SetSurroundingText(
+ zcr_extended_text_input_v1_set_large_surrounding_text(
+ extended_obj_.get(), memfd.get(), text.length(),
+ selection_range.start(), selection_range.end());
++#endif
+ } else {
+ zwp_text_input_v1_set_surrounding_text(obj_.get(), text.c_str(),
+ selection_range.start(),