X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fcommon%2Fezusb.c;h=c2849741c45d7854386887b232eb1a053f177a90;hb=bf3f06c9c2a73b7c30862daab1e2731768ba6abc;hp=a8a84174f99e18c9872145b9ab6888d01e5e9eed;hpb=12f3e8741b5ae651569ca65b94f22a4dc154da7a;p=libsigrok.git 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);