summaryrefslogtreecommitdiffstats
path: root/package/mii-diag/mii-diag-strchr.patch
diff options
context:
space:
mode:
authorHamish Moffatt <hamish@cloud.net.au>2008-06-26 06:43:33 +0000
committerHamish Moffatt <hamish@cloud.net.au>2008-06-26 06:43:33 +0000
commit051ed92d2419bae68ef5c8386ac032a0e2b3ca4d (patch)
tree0bd0754a4ff81a842e9844694fc94c7511aacbc9 /package/mii-diag/mii-diag-strchr.patch
parent40da0ab47af0c3f10ce57616c092ce206af8abce (diff)
downloadbuildroot-novena-051ed92d2419bae68ef5c8386ac032a0e2b3ca4d.tar.gz
buildroot-novena-051ed92d2419bae68ef5c8386ac032a0e2b3ca4d.zip
Added mii-diag package
Diffstat (limited to 'package/mii-diag/mii-diag-strchr.patch')
-rw-r--r--package/mii-diag/mii-diag-strchr.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/mii-diag/mii-diag-strchr.patch b/package/mii-diag/mii-diag-strchr.patch
new file mode 100644
index 000000000..537c04241
--- /dev/null
+++ b/package/mii-diag/mii-diag-strchr.patch
@@ -0,0 +1,20 @@
+--- mii-diag-2.11.orig/mii-diag.c.orig 2008-06-25 11:08:52.000000000 +1000
++++ mii-diag-2.11.orig/mii-diag.c 2005-03-27 03:56:33.000000000 +1000
+@@ -174,7 +174,7 @@
+ {
+ int c, errflag = 0;
+ char **spp, *ifname;
+- char *progname = rindex(argv[0], '/') ? rindex(argv[0], '/')+1 : argv[0];
++ char *progname = strrchr(argv[0], '/') ? strrchr(argv[0], '/')+1 : argv[0];
+
+ while ((c = getopt_long(argc, argv, shortopts, longopts, 0)) != EOF)
+ switch (c) {
+@@ -310,7 +310,7 @@
+ str = endstr+1;
+ else {
+ fprintf(stderr, "Invalid driver parameter '%s'.\n", str);
+- str = index(str, ',');
++ str = strchr(str, ',');
+ }
+ } else if (endstr[0] == ',') {
+ data32[i] = newval;