Skip to contentSkip to conversation

Cross compile issues with alsa-utils

PATCH Applied Will Wagner 2 participants 2 messages Jan 15, 2009 – Jan 19, 2009

lore
Share & tools
lore
#0 lore raw

Hi All,

I have been cross compiling alsa-utils with buildroot (www.buildroot.org) and have run into two issues.

The first is that alsactl is using index & rindex which are legacy functions not supported with all cross compile toolchains. Attached is a patch to replace the calls with strchr and strrchr.

The second issue is again with alsactl. It is trying to generate the alsactl_init.7 man page but I do not have xmlto to convert it to a man page. Could a configure option be added to not build any docs - similar to alsa-lib configure.

Thanks,

Will.

Signature · 5 lines
------------------------------------------------------------------------
Will Wagner                                     [email protected]
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
alsactl/init_parse.c +2 -2
@@ -381,7 +381,7 @@ static int set_ctl_value(struct space *s
 				snd_ctl_elem_value_set_integer(space->ctl_value, idx, val);
 			} else if (items > 2 && value[items-2] == 'd' && value[items-1] == 'B') {
 				val = strtol(value, NULL, 0) * 100;
-				if ((pos2 = index(value, '.')) != NULL) {
+				if ((pos2 = strchr(value, '.')) != NULL) {
 					if (isdigit(*(pos2-1)) && isdigit(*(pos2-2))) {
 						if (val < 0)
 							val -= strtol(pos2 + 1, NULL, 0);
@@ -1253,7 +1253,7 @@ static char *new_root_dir(const char *fi
 
 	res = strdup(filename);
 	if (res) {
-		tmp = rindex(res, '/');
+		tmp = strrchr(res, '/');
 		if (tmp)
 			*tmp = '\0';
 	}

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Applied
#1 lore raw

At Thu, 15 Jan 2009 11:11:38 +0000,

Quoted 9 lines · Will Wagner

Hi All,

I have been cross compiling alsa-utils with buildroot (www.buildroot.org) and have run into two issues.

The first is that alsactl is using index & rindex which are legacy functions not supported with all cross compile toolchains. Attached is a patch to replace the calls with strchr and strrchr.

Thanks, applied now to GIT tree. Unfortunately, it slipped from 1.0.19 release, though.

Quoted 3 lines

The second issue is again with alsactl. It is trying to generate the alsactl_init.7 man page but I do not have xmlto to convert it to a man page. Could a configure option be added to not build any docs - similar to alsa-lib configure.

In the recent version, you already have --disable-xmlto configure option.

thanks,

Takashi