commit:     dde66c941d335b7b47fbd92e1f61aab7155422fd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 10 03:33:06 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 03:33:06 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dde66c94

sys-apps/usb_modeswitch: fix build w/ C23

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/usb_modeswitch/files/c23.patch            | 23 ++++++++++++++++++++++
 ...2.6.1.ebuild => usb_modeswitch-2.6.1-r1.ebuild} |  7 +++++--
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/sys-apps/usb_modeswitch/files/c23.patch 
b/sys-apps/usb_modeswitch/files/c23.patch
new file mode 100644
index 000000000000..de91abdad721
--- /dev/null
+++ b/sys-apps/usb_modeswitch/files/c23.patch
@@ -0,0 +1,23 @@
+get_current_config_value doesn't take any arguments, dev is a global variable.
+
+Bug: https://bugs.gentoo.org/944427
+--- a/usb_modeswitch.c
++++ b/usb_modeswitch.c
+@@ -570,7 +570,7 @@ int main(int argc, char **argv)
+       /* Get current configuration of default device, note value if 
Configuration
+        * parameter is set. Also sets active_config
+        */
+-      currentConfigVal = get_current_config_value(dev);
++      currentConfigVal = get_current_config_value();
+       if (Configuration > -1) {
+               SHOW_PROGRESS(output,"Current configuration number is %d\n", 
currentConfigVal);
+       } else
+@@ -772,7 +772,7 @@ int main(int argc, char **argv)
+       if (Configuration > 0) {
+               if (currentConfigVal != Configuration) {
+                       if (switchConfiguration()) {
+-                              currentConfigVal = 
get_current_config_value(dev);
++                              currentConfigVal = get_current_config_value();
+                               if (currentConfigVal == Configuration) {
+                                       SHOW_PROGRESS(output,"The configuration 
was set successfully\n");
+                               } else {

diff --git a/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1.ebuild 
b/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1-r1.ebuild
similarity index 92%
rename from sys-apps/usb_modeswitch/usb_modeswitch-2.6.1.ebuild
rename to sys-apps/usb_modeswitch/usb_modeswitch-2.6.1-r1.ebuild
index d20c200a940a..bac271999447 100644
--- a/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1.ebuild
+++ b/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -30,7 +30,10 @@ BDEPEND="virtual/pkgconfig"
 
 CONFIG_CHECK="~USB_SERIAL"
 
-PATCHES=( "${FILESDIR}/usb_modeswitch.sh-tmpdir.patch" )
+PATCHES=(
+       "${FILESDIR}/usb_modeswitch.sh-tmpdir.patch"
+       "${FILESDIR}/c23.patch"
+)
 
 src_prepare() {
        default

Reply via email to