PATCH: With BSD code disabled (index, bcopy, etc..) the uClibc installer uses index!

Kevin Day thekevinday at gmail.com
Sun Sep 9 17:24:42 UTC 2007


It should not be using index()
This fails when index() is not in uClibc.

--- uClibc-0.9.29/extra/config/lxdialog/util.c.orig     2007-09-09
12:16:59 -0500
+++ uClibc-0.9.29/extra/config/lxdialog/util.c  2007-09-09 12:17:46 -0500
@@ -336,7 +336,7 @@
                newl = 1;
                word = tempstr;
                while (word && *word) {
-                       sp = index(word, ' ');
+                       sp = strchr(word, ' ');
                        if (sp)
                                *sp++ = 0;

@@ -348,7 +348,7 @@
                        if (wlen > room ||
                            (newl && wlen < 4 && sp
                             && wlen + 1 + strlen(sp) > room
-                            && (!(sp2 = index(sp, ' '))
+                            && (!(sp2 = strchr(sp, ' '))
                                 || wlen + 1 + (sp2 - sp) > room))) {
                                cur_y++;
                                cur_x = x;


-- 
Kevin Day



More information about the uClibc mailing list