diff options
author | Vadim Mikhailov <mvp@users.noreply.github.com> | 2016-11-10 10:32:27 -0800 |
---|---|---|
committer | Vadim Mikhailov <mvp@users.noreply.github.com> | 2016-11-10 10:44:56 -0800 |
commit | 6173f7db13e05a12a967d76c79d7676d661e5c86 (patch) | |
tree | 54ff0becf668633de9c8ce6be487214958c85031 /uhubctl.c | |
parent | 4bc4f02cd154bd6b58ae15535bd13331c9fb4170 (diff) |
Make it compatible with older libusb, up to 1.0.12
Apparently, even some modern Linux systems (e.g. Centos 7)
still have very old libusb versions installed (e.g. 1.0.15).
To solve this, instead of libusb_get_port_numbers()
use equivalent deprecated API libusb_get_port_path()
which was introduced in libusb 1.0.12.
Diffstat (limited to 'uhubctl.c')
-rw-r--r-- | uhubctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -331,7 +331,7 @@ static int usb_find_hubs() int bus = libusb_get_bus_number(dev); sprintf(hubs[hub_count].location, "%d", bus); - int pcount = libusb_get_port_numbers(dev, port_numbers, MAX_HUB_CHAIN); + int pcount = libusb_get_port_path(NULL, dev, port_numbers, MAX_HUB_CHAIN); int k; for (k=0; k<pcount; k++) { char s[8]; |