$OpenBSD: patch-sandbox_linux_BUILD_gn,v 1.12 2018/09/12 17:08:22 robert Exp $

Index: sandbox/linux/BUILD.gn
--- sandbox/linux/BUILD.gn.orig
+++ sandbox/linux/BUILD.gn
@@ -12,12 +12,12 @@ if (is_android) {
 }
 
 declare_args() {
-  compile_suid_client = is_linux
+  compile_suid_client = is_linux && !is_openbsd
 
-  compile_credentials = is_linux
+  compile_credentials = is_linux && !is_openbsd
 
   # On Android, use plain GTest.
-  use_base_test_suite = is_linux
+  use_base_test_suite = is_linux && !is_openbsd
 }
 
 if (is_nacl_nonsfi) {
@@ -257,7 +257,7 @@ component("seccomp_bpf") {
     "//base/third_party/dynamic_annotations",
   ]
 
-  if (is_nacl_nonsfi) {
+  if (is_nacl_nonsfi && !is_openbsd) {
     cflags = [ "-fgnu-inline-asm" ]
     sources -= [
       "bpf_dsl/bpf_dsl_forward.h",
@@ -349,30 +349,8 @@ component("sandbox_services") {
     "services/proc_util.h",
     "services/resource_limits.cc",
     "services/resource_limits.h",
-    "services/scoped_process.cc",
-    "services/scoped_process.h",
-    "services/syscall_wrappers.cc",
-    "services/syscall_wrappers.h",
     "services/thread_helpers.cc",
     "services/thread_helpers.h",
-    "services/yama.cc",
-    "services/yama.h",
-    "syscall_broker/broker_channel.cc",
-    "syscall_broker/broker_channel.h",
-    "syscall_broker/broker_client.cc",
-    "syscall_broker/broker_client.h",
-    "syscall_broker/broker_command.cc",
-    "syscall_broker/broker_command.h",
-    "syscall_broker/broker_file_permission.cc",
-    "syscall_broker/broker_file_permission.h",
-    "syscall_broker/broker_host.cc",
-    "syscall_broker/broker_host.h",
-    "syscall_broker/broker_permission_list.cc",
-    "syscall_broker/broker_permission_list.h",
-    "syscall_broker/broker_process.cc",
-    "syscall_broker/broker_process.h",
-    "syscall_broker/broker_simple_message.cc",
-    "syscall_broker/broker_simple_message.h",
   ]
 
   defines = [ "SANDBOX_IMPLEMENTATION" ]
@@ -424,6 +402,10 @@ component("sandbox_services") {
       "syscall_broker/broker_process.h",
       "syscall_broker/broker_simple_message.cc",
       "syscall_broker/broker_simple_message.h",
+    ]
+    sources += [
+      "services/libc_interceptor.cc",
+      "services/libc_interceptor.h",
     ]
   } else if (!is_android) {
     sources += [
