blob: 5de6fef3bf715b38fd88b2fad25fc244ef7c1990 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--- device/usb/usb_context.cc.orig 2017-06-05 19:03:07 UTC
+++ device/usb/usb_context.cc
@@ -9,8 +9,13 @@
#include "base/macros.h"
#include "base/threading/simple_thread.h"
#include "device/usb/usb_error.h"
+#if defined(OS_FREEBSD)
+#include "libusb.h"
+#define LIBUSB_CALL
+#else
#include "third_party/libusb/src/libusb/interrupt.h"
#include "third_party/libusb/src/libusb/libusb.h"
+#endif
namespace device {
@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() {
void UsbContext::UsbEventHandler::Stop() {
base::subtle::Release_Store(&running_, 0);
+#if !defined(OS_FREEBSD) // XXX(rene) not available in base version
libusb_interrupt_handle_event(context_);
+#endif
}
UsbContext::UsbContext(PlatformUsbContext context) : context_(context) {
|