From a2a952c0da4b337ffcb3d26ba473761c48a6eb65 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Thu, 6 Sep 2007 17:31:44 +0200 Subject: [PATCH] be compatible with libusb-versions without dev->devnum member --- usb-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5