ports/www/chromium/files/patch-device__usb__usb_context.cc
Rene Ladan 347e2bc55f www/chromium: update to 39.0.2171.65
MFH:		2014Q4
Security:	d395e44f-6f4f-11e4-a444-00262d5ed8ee
2014-11-20 06:55:14 +00:00

26 lines
737 B
C++

--- device/usb/usb_context.cc.orig 2014-10-10 09:15:31 UTC
+++ device/usb/usb_context.cc
@@ -9,8 +9,13 @@
#include "base/synchronization/waitable_event.h"
#include "base/threading/platform_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 {
@@ -43,7 +48,9 @@
UsbContext::UsbEventHandler::~UsbEventHandler() {
base::subtle::Release_Store(&running_, 0);
+#if !defined(OS_FREEBSD) // XXX(rene) not available in base version
libusb_interrupt_handle_event(context_);
+#endif
base::PlatformThread::Join(thread_handle_);
}