From 6bfb3087866606ed36a21e7bd05f0674e6a97158 Mon Sep 17 00:00:00 2001 From: Bauerchen <bauerc...@tencent.com> Date: Thu, 2 Apr 2020 19:19:00 +0800 Subject: [PATCH] Fix:fix the wrong function name of libusb_get_port_number
[desc]: libusb_get_port_numbers is called in function usb_host_get_port, and qemu crashed with: symbol lookup error: undefined symbol: libusb_get_port_numbers I check /lib64/libusb-1.0.so.0 and output is libusb_get_port_number, I change it to libusb_get_port_number, crash problem is gone; so is it just a function name bug? Signed-off-by: Bauerchen <bauerc...@tencent.com> --- hw/usb/host-libusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 2ac7a93..713db8d 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -285,7 +285,7 @@ static int usb_host_get_port(libusb_device *dev, char *port, size_t len) int rc, i; #if LIBUSB_API_VERSION >= 0x01000102 - rc = libusb_get_port_numbers(dev, path, 7); + rc = libusb_get_port_number(dev, path, 7); #else rc = libusb_get_port_path(ctx, dev, path, 7); #endif -- 1.8.3.1 ------------- bauerchen