2017-06-20 22:20:44 +02:00
|
|
|
--- device/usb/usb_context.cc.orig 2017-06-05 19:03:07 UTC
|
2016-06-07 22:28:41 +02:00
|
|
|
+++ device/usb/usb_context.cc
|
|
|
|
@@ -9,8 +9,13 @@
|
|
|
|
#include "base/macros.h"
|
|
|
|
#include "base/threading/simple_thread.h"
|
2014-11-20 07:55:14 +01:00
|
|
|
#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 {
|
|
|
|
|
2017-06-20 22:20:44 +02:00
|
|
|
@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() {
|
2014-11-20 07:55:14 +01:00
|
|
|
|
2015-07-28 20:35:43 +02:00
|
|
|
void UsbContext::UsbEventHandler::Stop() {
|
2014-11-20 07:55:14 +01:00
|
|
|
base::subtle::Release_Store(&running_, 0);
|
|
|
|
+#if !defined(OS_FREEBSD) // XXX(rene) not available in base version
|
|
|
|
libusb_interrupt_handle_event(context_);
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
2015-07-28 20:35:43 +02:00
|
|
|
UsbContext::UsbContext(PlatformUsbContext context) : context_(context) {
|