$OpenBSD: patch-content_browser_renderer_host_render_process_host_impl_cc,v 1.27 2019/09/23 07:18:04 robert Exp $

Index: content/browser/renderer_host/render_process_host_impl.cc
--- content/browser/renderer_host/render_process_host_impl.cc.orig
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -231,7 +231,7 @@
 #include "content/browser/compositor/image_transport_factory.h"
 #endif
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
 #include <sys/resource.h>
 #include <sys/time.h>
 #endif
@@ -1226,7 +1226,7 @@ static constexpr size_t kUnknownPlatformProcessLimit =
 // to indicate failure and std::numeric_limits<size_t>::max() to indicate
 // unlimited.
 size_t GetPlatformProcessLimit() {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
   struct rlimit limit;
   if (getrlimit(RLIMIT_NPROC, &limit) != 0)
     return kUnknownPlatformProcessLimit;
@@ -1237,7 +1237,7 @@ size_t GetPlatformProcessLimit() {
 #else
   // TODO(https://crbug.com/104689): Implement on other platforms.
   return kUnknownPlatformProcessLimit;
-#endif  // defined(OS_LINUX)
+#endif  // defined(OS_LINUX) || defined(OS_BSD)
 }
 #endif  // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
 
@@ -2979,6 +2979,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin
     switches::kEnableMediaSuspend,
     switches::kEnableLCDText,
     switches::kEnableLogging,
+    switches::kDisableUnveil,
     switches::kEnableNetworkInformationDownlinkMax,
     switches::kEnableOopRasterization,
     switches::kEnablePluginPlaceholderTesting,
