$OpenBSD: patch-chrome_browser_zygote_main_linux_cc,v 1.2 2011/02/08 09:43:02 espie Exp $
--- chrome/browser/zygote_main_linux.cc.orig	Fri Jan 21 10:20:26 2011
+++ chrome/browser/zygote_main_linux.cc	Sun Jan 23 23:27:33 2011
@@ -2,12 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "build/build_config.h"
+
 #include <dlfcn.h>
 #include <fcntl.h>
 #include <pthread.h>
+#if defined(OS_OPENBSD)
+#include <signal.h>
+#else
 #include <sys/epoll.h>
 #include <sys/prctl.h>
 #include <sys/signal.h>
+#endif
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -52,9 +58,9 @@
 #include "unicode/timezone.h"
 
 #if defined(ARCH_CPU_X86_FAMILY) && !defined(CHROMIUM_SELINUX) && \
-    !defined(__clang__)
+    !defined(__clang__) && !defined(OS_OPENBSD)
 // The seccomp sandbox is enabled on all ia32 and x86-64 processor as long as
-// we aren't using SELinux or clang.
+// we aren't using SELinux or clang. OpenBSD is not yet supported.
 #define SECCOMP_SANDBOX
 #endif
 
@@ -175,6 +181,11 @@ class Zygote {
         case ZygoteHost::kCmdGetSandboxStatus:
           HandleGetSandboxStatus(fd, pickle, iter);
           return false;
+#if defined(OS_OPENBSD)
+        case ZygoteHost::kCmdEnd:
+          _exit(0);
+          return false;
+#endif
         default:
           NOTREACHED();
           break;
@@ -644,7 +655,7 @@ static bool EnterSandbox() {
     }
 
     SkiaFontConfigUseIPCImplementation(kMagicSandboxIPCDescriptor);
-
+#if !defined(OS_OPENBSD)
     // Previously, we required that the binary be non-readable. This causes the
     // kernel to mark the process as non-dumpable at startup. The thinking was
     // that, although we were putting the renderers into a PID namespace (with
@@ -670,6 +681,7 @@ static bool EnterSandbox() {
         return false;
       }
     }
+#endif // !OS_OPENBSD
   } else if (switches::SeccompSandboxEnabled()) {
     PreSandboxInit();
     SkiaFontConfigUseIPCImplementation(kMagicSandboxIPCDescriptor);
