From: Uwe Hermann Date: Fri, 10 Feb 2012 23:20:23 +0000 (+0100) Subject: sr: MinGW/Mac: No libusb_detach_kernel_driver() support. X-Git-Tag: libsigrok-0.1.0~141 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bf3f06c9c2a73b7c30862daab1e2731768ba6abc;p=libsigrok.git sr: MinGW/Mac: No libusb_detach_kernel_driver() support. --- diff --git a/hardware/common/ezusb.c b/hardware/common/ezusb.c index a8a84174..c2849741 100644 --- a/hardware/common/ezusb.c +++ b/hardware/common/ezusb.c @@ -96,12 +96,15 @@ SR_PRIV int ezusb_upload_firmware(libusb_device *dev, int configuration, return SR_ERR; } +/* Neither Windows/MinGW nor Darwin/Mac support these libusb-1.0 calls. */ +#if !defined(_WIN32) && !defined(__APPLE__) if (libusb_kernel_driver_active(hdl, 0)) { if ((err = libusb_detach_kernel_driver(hdl, 0)) < 0) { sr_warn("failed to detach kernel driver: %d", err); return SR_ERR; } } +#endif if ((err = libusb_set_configuration(hdl, configuration)) < 0) { sr_warn("Unable to set configuration: %d", err);