$OpenBSD: patch-chrome_browser_chrome_browser_main_posix_cc,v 1.9 2014/07/20 17:22:33 robert Exp $
--- chrome/browser/chrome_browser_main_posix.cc.orig.port	Tue Jul 15 13:01:31 2014
+++ chrome/browser/chrome_browser_main_posix.cc	Thu Jul 17 12:25:31 2014
@@ -283,7 +283,7 @@ void ChromeBrowserMainPartsPosix::PreEarlyInitializati
   if (!fd_limit_string.empty()) {
     base::StringToInt(fd_limit_string, &fd_limit);
   }
-#if defined(OS_MACOSX)
+#if defined(OS_BSD)
   // We use quite a few file descriptors for our IPC, and the default limit on
   // the Mac is low (256), so bump it up if there is no explicit override.
   if (fd_limit == 0) {
@@ -305,6 +305,11 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopS
     g_pipe_pid = getpid();
     g_shutdown_pipe_read_fd = pipefd[0];
     g_shutdown_pipe_write_fd = pipefd[1];
+#if defined(OS_OPENBSD)
+    // PTHREAD_STACK_MIN causes chromium to crash under FreeBSD,
+    // we request the default pthread stack size by specifying 0 here.
+    const size_t kShutdownDetectorThreadStackSize = 0;
+#else 
 #if !defined(ADDRESS_SANITIZER) && !defined(KEEP_SHADOW_STACKS)
     const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
 #else
@@ -312,6 +317,7 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopS
     // shadow stacks) bloat the stack frames, so we need to increase the stack
     // size to avoid hitting the guard page.
     const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
+#endif
 #endif
     // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so
     // if you change this, you'll probably need to change the suppression.
