$OpenBSD: patch-services_device_usb_BUILD_gn,v 1.8 2021/11/16 11:28:47 robert Exp $

Index: services/device/usb/BUILD.gn
--- services/device/usb/BUILD.gn.orig
+++ services/device/usb/BUILD.gn
@@ -102,15 +102,17 @@ static_library("usb") {
     deps += [ "//third_party/re2" ]
   }
 
-  if (is_mac) {
-    sources += [
-      "usb_device_handle_mac.cc",
-      "usb_device_handle_mac.h",
-      "usb_device_mac.cc",
-      "usb_device_mac.h",
-      "usb_service_mac.cc",
-      "usb_service_mac.h",
-    ]
+  if (is_mac || is_openbsd) {
+    if (is_mac) {
+      sources += [
+        "usb_device_handle_mac.cc",
+        "usb_device_handle_mac.h",
+        "usb_device_mac.cc",
+        "usb_device_mac.h",
+        "usb_service_mac.cc",
+        "usb_service_mac.h",
+      ]
+    }
 
     # These sources and deps are required for libusb.
     # TODO(https://crbug.com/1096743) Remove these sources.
@@ -151,7 +153,7 @@ static_library("usb") {
     deps += [ "//device/udev_linux" ]
   }
 
-  if (is_android || is_chromeos || is_linux) {
+  if (is_android || is_chromeos || is_linux && !is_openbsd) {
     sources += [
       "usb_device_handle_usbfs.cc",
       "usb_device_handle_usbfs.h",
