summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/usb-modeswitch
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2025-03-25 13:26:06 +0100
committerKhem Raj <raj.khem@gmail.com>2025-03-25 18:30:53 -0700
commit7211d1fec1d44edb5e4123c8c617c8a08c6f9e3b (patch)
treecaccde445ea64e98001a3b897b1e651ca0c31220 /meta-oe/recipes-support/usb-modeswitch
parent37cc472e44ef5b2b8c0ae8b5bcebf875fa9dd5be (diff)
downloadmeta-openembedded-7211d1fec1d44edb5e4123c8c617c8a08c6f9e3b.tar.gz
usb-modeswitch: fix build with gcc-15
Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/usb-modeswitch')
-rw-r--r--meta-oe/recipes-support/usb-modeswitch/usb-modeswitch/0001-Fix-build-with-gcc-15.patch51
-rw-r--r--meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.6.1.bb4
2 files changed, 54 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch/0001-Fix-build-with-gcc-15.patch b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch/0001-Fix-build-with-gcc-15.patch
new file mode 100644
index 0000000000..eb65beb686
--- /dev/null
+++ b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch/0001-Fix-build-with-gcc-15.patch
@@ -0,0 +1,51 @@
1From f497eef1f38bd79a96a13269f251f1413c54b790 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Tue, 25 Mar 2025 12:36:32 +0100
4Subject: [PATCH] Fix build with gcc-15
5
6* fixes:
7 http://errors.yoctoproject.org/Errors/Details/848747/
8
9usb_modeswitch.c: In function 'main':
10usb_modeswitch.c:573:28: error: too many arguments to function 'get_current_config_value'; expected 0, have 1
11 573 | currentConfigVal = get_current_config_value(dev);
12 | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~
13In file included from usb_modeswitch.c:59:
14usb_modeswitch.h:55:5: note: declared here
15 55 | int get_current_config_value();
16 | ^~~~~~~~~~~~~~~~~~~~~~~~
17usb_modeswitch.c:775:52: error: too many arguments to function 'get_current_config_value'; expected 0, have 1
18 775 | currentConfigVal = get_current_config_value(dev);
19 | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~
20usb_modeswitch.h:55:5: note: declared here
21 55 | int get_current_config_value();
22 | ^~~~~~~~~~~~~~~~~~~~~~~~
23
24Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
25Upstream-Status: Submitted [https://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=3122]
26---
27 usb_modeswitch.c | 4 ++--
28 1 file changed, 2 insertions(+), 2 deletions(-)
29
30diff --git a/usb_modeswitch.c b/usb_modeswitch.c
31index 2d4c0aa..bfbcbfb 100644
32--- a/usb_modeswitch.c
33+++ b/usb_modeswitch.c
34@@ -570,7 +570,7 @@ int main(int argc, char **argv)
35 /* Get current configuration of default device, note value if Configuration
36 * parameter is set. Also sets active_config
37 */
38- currentConfigVal = get_current_config_value(dev);
39+ currentConfigVal = get_current_config_value();
40 if (Configuration > -1) {
41 SHOW_PROGRESS(output,"Current configuration number is %d\n", currentConfigVal);
42 } else
43@@ -772,7 +772,7 @@ int main(int argc, char **argv)
44 if (Configuration > 0) {
45 if (currentConfigVal != Configuration) {
46 if (switchConfiguration()) {
47- currentConfigVal = get_current_config_value(dev);
48+ currentConfigVal = get_current_config_value();
49 if (currentConfigVal == Configuration) {
50 SHOW_PROGRESS(output,"The configuration was set successfully\n");
51 } else {
diff --git a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.6.1.bb b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.6.1.bb
index cd3840feab..b6b720fe1e 100644
--- a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.6.1.bb
+++ b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.6.1.bb
@@ -4,7 +4,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=091556bd6d0154cd4c2d17a1bfc7380a"
4 4
5DEPENDS = "libusb1" 5DEPENDS = "libusb1"
6 6
7SRC_URI = "http://www.draisberghof.de/usb_modeswitch/${BP}.tar.bz2" 7SRC_URI = "http://www.draisberghof.de/usb_modeswitch/${BP}.tar.bz2 \
8 file://0001-Fix-build-with-gcc-15.patch \
9"
8SRC_URI[sha256sum] = "5195d9e136e52f658f19e9f93e4f982b1b67bffac197d0a455cd8c2cd245fa34" 10SRC_URI[sha256sum] = "5195d9e136e52f658f19e9f93e4f982b1b67bffac197d0a455cd8c2cd245fa34"
9 11
10inherit pkgconfig systemd 12inherit pkgconfig systemd