sysctl: remove index() for buildroot
The uClibc does not support index() function. A patch from Buildroot. Reference: http://git.buildroot.net/buildroot/patch/?id=f460603f02092b4f514d108dd8b4167a7a056213 Backported-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
2019cbfded
commit
dd03003edd
4
sysctl.c
4
sysctl.c
@ -297,7 +297,7 @@ static int WriteSetting(const char *setting) {
|
||||
return 0;
|
||||
} /* end if */
|
||||
|
||||
equals = index(setting, '=');
|
||||
equals = strchr(setting, '=');
|
||||
|
||||
if (!equals) {
|
||||
fprintf(stderr, ERR_NO_EQUALS, setting);
|
||||
@ -546,7 +546,7 @@ int main(int argc, char *argv[]) {
|
||||
if (NameOnly && Quiet) // nonsense
|
||||
return Usage(me);
|
||||
SwitchesAllowed = false;
|
||||
if (WriteMode || index(*argv, '='))
|
||||
if (WriteMode || strchr(*argv, '='))
|
||||
ReturnCode = WriteSetting(*argv);
|
||||
else
|
||||
ReturnCode = ReadSetting(*argv);
|
||||
|
Loading…
Reference in New Issue
Block a user