aboutsummaryrefslogtreecommitdiff
path: root/devel/electron29/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron29/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc')
-rw-r--r--devel/electron29/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/devel/electron29/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc b/devel/electron29/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc
new file mode 100644
index 000000000000..d03589c019e2
--- /dev/null
+++ b/devel/electron29/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc
@@ -0,0 +1,37 @@
+--- content/utility/speech/speech_recognition_sandbox_hook_linux.cc.orig 2023-02-01 18:43:20 UTC
++++ content/utility/speech/speech_recognition_sandbox_hook_linux.cc
+@@ -12,11 +12,14 @@
+ #include "sandbox/linux/syscall_broker/broker_command.h"
+ #include "sandbox/linux/syscall_broker/broker_file_permission.h"
+
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+
+ namespace speech {
+
++#if !BUILDFLAG(IS_BSD)
+ namespace {
+
+ // Gets the file permissions required by the Speech On-Device API (SODA).
+@@ -50,9 +53,11 @@ std::vector<BrokerFilePermission> GetSodaFilePermissio
+ }
+
+ } // namespace
++#endif
+
+ bool SpeechRecognitionPreSandboxHook(
+ sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(ENABLE_SODA_INTEGRATION_TESTS)
+ base::FilePath test_binary_path = GetSodaTestBinaryPath();
+ DVLOG(0) << "SODA test binary path: " << test_binary_path.value().c_str();
+@@ -77,6 +82,7 @@ bool SpeechRecognitionPreSandboxHook(
+ sandbox::policy::SandboxLinux::PreSandboxHook(),
+ options);
+ instance->EngageNamespaceSandboxIfPossible();
++#endif
+
+ return true;
+ }