0001-dont-use-legacy-functions.patch 684 B

123456789101112131415161718
  1. Use strstr() instead of index(), since index() is a legacy function
  2. and it may not be available in uClibc, depending on the configuration.
  3. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  4. Index: rubix-1.0.5/cube.c
  5. ===================================================================
  6. --- rubix-1.0.5.orig/cube.c 2010-02-14 14:19:05.000000000 +0100
  7. +++ rubix-1.0.5/cube.c 2010-02-14 14:19:14.000000000 +0100
  8. @@ -257,7 +257,7 @@
  9. if (i==-1) goto finish;
  10. if (buffer[0]=='%') goto new_section;
  11. buffer[0]=toupper(buffer[0]);
  12. - ptr = index(buffer, '=');
  13. + ptr = strstr(buffer, '=');
  14. if (ptr) {
  15. ++ptr;
  16. while (isspace(*ptr)) ++ptr;