0001-index-is-legacy.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. index() is a legacy function, not implemented in some uClibc
  2. configurations.
  3. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  4. ---
  5. libmb/mbexp.c | 2 +-
  6. libmb/mbmenu.c | 2 +-
  7. 2 files changed, 2 insertions(+), 2 deletions(-)
  8. Index: libmatchbox-1.9/libmb/mbexp.c
  9. ===================================================================
  10. --- libmatchbox-1.9.orig/libmb/mbexp.c
  11. +++ libmatchbox-1.9/libmb/mbexp.c
  12. @@ -492,7 +492,7 @@
  13. /* get the family */
  14. - if (index(spec, ',') != NULL || index(spec, '-') != NULL)
  15. + if (strchr(spec, ',') != NULL || strchr(spec, '-') != NULL)
  16. has_comma_delim = True;
  17. while (!got_family) {
  18. Index: libmatchbox-1.9/libmb/mbmenu.c
  19. ===================================================================
  20. --- libmatchbox-1.9.orig/libmb/mbmenu.c
  21. +++ libmatchbox-1.9/libmb/mbmenu.c
  22. @@ -433,7 +433,7 @@
  23. {
  24. s = p;
  25. found = NULL;
  26. - while(index("/\0", *p) == NULL) p++;
  27. + while(strchr("/\0", *p) == NULL) p++;
  28. if (*p != '\0') { *p = '\0'; p++; };
  29. item = current->items;