You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

libftdi-0.12_win32.patch 721 B

1234567891011121314151617181920
  1. --- src/ftdi.c.orig Wed Apr 16 16:24:30 2008
  2. +++ src/ftdi.c Thu May 01 20:19:46 2008
  3. @@ -358,6 +358,17 @@
  4. if (usb_detach_kernel_driver_np(ftdi->usb_dev, ftdi->interface) != 0 && errno != ENODATA)
  5. detach_errno = errno;
  6. #endif
  7. +
  8. +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  9. + if (usb_set_configuration(ftdi->usb_dev, 1) != 0) {
  10. + usb_close (ftdi->usb_dev);
  11. + if (detach_errno == EPERM) {
  12. + ftdi_error_return(-8, "inappropriate permissions on device!");
  13. + } else {
  14. + ftdi_error_return(-5, "unable to set configuration");
  15. + }
  16. + }
  17. +#endif
  18. if (usb_claim_interface(ftdi->usb_dev, ftdi->interface) != 0) {
  19. usb_close (ftdi->usb_dev);