sys-apps/usb_modeswitch: fix build w/ C23

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-03-10 03:33:06 +00:00
parent 58c8c500c5
commit dde66c941d
2 changed files with 28 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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