]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/matchbox-lib/0001-index-is-legacy.patch
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / package / matchbox-lib / 0001-index-is-legacy.patch
1 index() is a legacy function, not implemented in some uClibc
2 configurations.
3
4 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5 ---
6  libmb/mbexp.c  |    2 +-
7  libmb/mbmenu.c |    2 +-
8  2 files changed, 2 insertions(+), 2 deletions(-)
9
10 Index: libmatchbox-1.9/libmb/mbexp.c
11 ===================================================================
12 --- libmatchbox-1.9.orig/libmb/mbexp.c
13 +++ libmatchbox-1.9/libmb/mbexp.c
14 @@ -492,7 +492,7 @@
15  
16    /* get the family */
17  
18 -  if (index(spec, ',') != NULL || index(spec, '-') != NULL) 
19 +  if (strchr(spec, ',') != NULL || strchr(spec, '-') != NULL) 
20      has_comma_delim = True;
21  
22    while (!got_family) {
23 Index: libmatchbox-1.9/libmb/mbmenu.c
24 ===================================================================
25 --- libmatchbox-1.9.orig/libmb/mbmenu.c
26 +++ libmatchbox-1.9/libmb/mbmenu.c
27 @@ -433,7 +433,7 @@
28     {
29        s = p;
30        found   = NULL;
31 -      while(index("/\0", *p) == NULL) p++;
32 +      while(strchr("/\0", *p) == NULL) p++;
33        if (*p != '\0') { *p = '\0'; p++; };
34  
35        item = current->items;