aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRui Salvaterra <rsalvaterra@gmail.com>2021-03-05 12:09:31 +0000
committerPetr Štetiar <ynezz@true.cz>2021-03-05 14:54:35 +0100
commit7e1ab3b7462b11885a5b9a48804463dba465fe9a (patch)
tree9d301b8dd14ad5e4909e59de011a18e59f5290f9 /target
parent5601da24a89f396c173c31252d679a9eeb9913c3 (diff)
downloadupstream-7e1ab3b7462b11885a5b9a48804463dba465fe9a.tar.gz
upstream-7e1ab3b7462b11885a5b9a48804463dba465fe9a.tar.bz2
upstream-7e1ab3b7462b11885a5b9a48804463dba465fe9a.zip
kernel: backport GCC 10 usbip build fix for 5.4
From the original commit message: "With GCC 10, building usbip triggers error for multiple definition of 'udev_context', in: - libsrc/vhci_driver.c:18 and - libsrc/usbip_host_common.c:27. Declare as extern the definition in libsrc/usbip_host_common.c." Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> (cherry picked from commit 0eef8402ee2ad014121932c860174e6d95440e17)
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
new file mode 100644
index 0000000000..03f27fb528
--- /dev/null
+++ b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
@@ -0,0 +1,33 @@
+From d5efc2e6b98fe661dbd8dd0d5d5bfb961728e57a Mon Sep 17 00:00:00 2001
+From: Antonio Borneo <borneo.antonio@gmail.com>
+Date: Thu, 18 Jun 2020 02:08:44 +0200
+Subject: usbip: tools: fix build error for multiple definition
+
+With GCC 10, building usbip triggers error for multiple definition
+of 'udev_context', in:
+- libsrc/vhci_driver.c:18 and
+- libsrc/usbip_host_common.c:27.
+
+Declare as extern the definition in libsrc/usbip_host_common.c.
+
+Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
+Acked-by: Shuah Khan <skhan@linuxfoundation.org>
+Link: https://lore.kernel.org/r/20200618000844.1048309-1-borneo.antonio@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/usb/usbip/libsrc/usbip_host_common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+(limited to 'tools/usb/usbip')
+
+--- a/tools/usb/usbip/libsrc/usbip_host_common.c
++++ b/tools/usb/usbip/libsrc/usbip_host_common.c
+@@ -23,7 +23,7 @@
+ #include "list.h"
+ #include "sysfs_utils.h"
+
+-struct udev *udev_context;
++extern struct udev *udev_context;
+
+ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
+ {