From: Michael Gernoth Date: Thu, 6 Sep 2007 15:31:44 +0000 (+0200) Subject: be compatible with libusb-versions without dev->devnum member X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/a2a952c0da4b337ffcb3d26ba473761c48a6eb65?hp=ddb9214f8df9d6be978eefb3f98b2f2055f3c3e0 be compatible with libusb-versions without dev->devnum member --- diff --git a/usb-driver.c b/usb-driver.c index 929c101..27a9580 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -534,7 +534,7 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { (desc->idProduct == e->matchTables[i].ProductId) && (desc->bDeviceClass == e->matchTables[i].bDeviceClass) && (desc->bDeviceSubClass == e->matchTables[i].bDeviceSubClass) && - ((devnum == -1) || (dev->devnum == devnum)) ) { + ((devnum == -1) || (strtol(dev->filename, NULL, 10) == devnum)) ) { int ac; for (ac = 0; ac < desc->bNumConfigurations; ac++) { struct usb_interface *interface = dev->config[ac].interface;