03f27fb5286279abd5c162469a856fceb36e6474
[openwrt/staging/nbd.git] /
1 From d5efc2e6b98fe661dbd8dd0d5d5bfb961728e57a Mon Sep 17 00:00:00 2001
2 From: Antonio Borneo <borneo.antonio@gmail.com>
3 Date: Thu, 18 Jun 2020 02:08:44 +0200
4 Subject: usbip: tools: fix build error for multiple definition
5
6 With GCC 10, building usbip triggers error for multiple definition
7 of 'udev_context', in:
8 - libsrc/vhci_driver.c:18 and
9 - libsrc/usbip_host_common.c:27.
10
11 Declare as extern the definition in libsrc/usbip_host_common.c.
12
13 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 Acked-by: Shuah Khan <skhan@linuxfoundation.org>
15 Link: https://lore.kernel.org/r/20200618000844.1048309-1-borneo.antonio@gmail.com
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 ---
18 tools/usb/usbip/libsrc/usbip_host_common.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 (limited to 'tools/usb/usbip')
22
23 --- a/tools/usb/usbip/libsrc/usbip_host_common.c
24 +++ b/tools/usb/usbip/libsrc/usbip_host_common.c
25 @@ -23,7 +23,7 @@
26 #include "list.h"
27 #include "sysfs_utils.h"
28
29 -struct udev *udev_context;
30 +extern struct udev *udev_context;
31
32 static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
33 {