aboutsummaryrefslogtreecommitdiff
path: root/devel/electron37/files/patch-services_device_usb_usb__service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron37/files/patch-services_device_usb_usb__service.cc')
-rw-r--r--devel/electron37/files/patch-services_device_usb_usb__service.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/devel/electron37/files/patch-services_device_usb_usb__service.cc b/devel/electron37/files/patch-services_device_usb_usb__service.cc
new file mode 100644
index 000000000000..d8a17eb59feb
--- /dev/null
+++ b/devel/electron37/files/patch-services_device_usb_usb__service.cc
@@ -0,0 +1,35 @@
+--- services/device/usb/usb_service.cc.orig 2025-06-30 07:04:30 UTC
++++ services/device/usb/usb_service.cc
+@@ -20,12 +20,16 @@
+
+ #if BUILDFLAG(IS_ANDROID)
+ #include "services/device/usb/usb_service_android.h"
+-#elif defined(USE_UDEV)
++#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD)
+ #include "services/device/usb/usb_service_linux.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "services/device/usb/usb_service_impl.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "services/device/usb/usb_service_win.h"
++#elif BUILDFLAG(IS_OPENBSD)
++#include "services/device/usb/usb_service_impl.h"
++#elif BUILDFLAG(IS_FREEBSD)
++#include "services/device/usb/usb_service_fake.h"
+ #endif
+
+ namespace device {
+@@ -48,11 +52,13 @@ std::unique_ptr<UsbService> UsbService::Create() {
+ std::unique_ptr<UsbService> UsbService::Create() {
+ #if BUILDFLAG(IS_ANDROID)
+ return base::WrapUnique(new UsbServiceAndroid());
+-#elif defined(USE_UDEV)
++#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD)
+ return base::WrapUnique(new UsbServiceLinux());
+ #elif BUILDFLAG(IS_WIN)
+ return base::WrapUnique(new UsbServiceWin());
+ #elif BUILDFLAG(IS_MAC)
++ return base::WrapUnique(new UsbServiceImpl());
++#elif BUILDFLAG(IS_BSD)
+ return base::WrapUnique(new UsbServiceImpl());
+ #else
+ return nullptr;