X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fusb.c;h=b453c04c8218d93a9ca22eff23f40e4f0c6e79c6;hb=00f0016cc361008cd9eb2e52fd2a01f333c0e3cd;hp=96df219fd734fa168d6347bfeeddad0d2e331f03;hpb=91057d2fc24c0ca058aa08c8ea6ada4eadf05ffd;p=libsigrok.git diff --git a/src/usb.c b/src/usb.c index 96df219f..b453c04c 100644 --- a/src/usb.c +++ b/src/usb.c @@ -184,7 +184,7 @@ static LIBUSB_CALL void usb_pollfd_added(libusb_os_handle fd, return; pollfd = g_slice_new(GPollFD); -#ifdef G_OS_WIN32 +#ifdef _WIN32 events = G_IO_IN; #endif pollfd->fd = (gintptr)fd; @@ -384,8 +384,7 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn) sr_dbg("Found USB device (VID:PID = %04x:%04x, bus.address = " "%d.%d).", des.idVendor, des.idProduct, b, a); - usb = sr_usb_dev_inst_new(libusb_get_bus_number(devlist[i]), - libusb_get_device_address(devlist[i]), NULL); + usb = sr_usb_dev_inst_new(b, a, NULL); devices = g_slist_append(devices, usb); } libusb_free_device_list(devlist, 1);