Portability patch from rfelker. The bb_asprintf.c thing needs an eventual

follow up in platform.h to set the #ifdef, but the workaround works for
everybody, so...
This commit is contained in:
Rob Landley
2006-03-09 22:21:20 +00:00
parent 3a324754f8
commit 1f305dc0fd
4 changed files with 13 additions and 2 deletions

View File

@@ -434,7 +434,7 @@ static char *parse_cmd_args(sed_cmd_t *sed_cmd, char *cmdstr)
while(isspace(*cmdstr)) cmdstr++;
length = strcspn(cmdstr, semicolon_whitespace);
if (length) {
sed_cmd->string = strndup(cmdstr, length);
sed_cmd->string = bb_xstrndup(cmdstr, length);
cmdstr += length;
}
}