util-linux-remove-deprecated-functions.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. diff -ur util-linux-2.12r/misc-utils/logger.c util-linux-2.12r-patched/misc-utils/logger.c
  2. --- util-linux-2.12r/misc-utils/logger.c 2004-09-06 16:13:49.000000000 -0500
  3. +++ util-linux-2.12r-patched/misc-utils/logger.c 2006-12-04 19:52:24.068596984 -0600
  4. @@ -198,7 +198,7 @@
  5. } else {
  6. if (p != buf)
  7. *p++ = ' ';
  8. - bcopy(*argv++, p, len);
  9. + memcpy(p, *argv++, len);
  10. *(p += len) = '\0';
  11. }
  12. }
  13. diff -ur util-linux-2.12r/misc-utils/whereis.c util-linux-2.12r-patched/misc-utils/whereis.c
  14. --- util-linux-2.12r/misc-utils/whereis.c 2001-03-15 04:09:58.000000000 -0600
  15. +++ util-linux-2.12r-patched/misc-utils/whereis.c 2006-12-04 19:52:43.210100415 -0600
  16. @@ -323,14 +323,14 @@
  17. char dirbuf[1024];
  18. struct stat statbuf;
  19. - dd = index(dir, '*');
  20. + dd = strchr(dir, '*');
  21. if (!dd)
  22. goto noglob;
  23. l = strlen(dir);
  24. if (l < sizeof(dirbuf)) { /* refuse excessively long names */
  25. strcpy (dirbuf, dir);
  26. - d = index(dirbuf, '*');
  27. + d = strchr(dirbuf, '*');
  28. *d = 0;
  29. dirp = opendir(dirbuf);
  30. if (dirp == NULL)
  31. diff -ur util-linux-2.12r/mount/mount.c util-linux-2.12r-patched/mount/mount.c
  32. --- util-linux-2.12r/mount/mount.c 2004-12-21 16:00:36.000000000 -0600
  33. +++ util-linux-2.12r-patched/mount/mount.c 2006-12-04 19:54:16.317414647 -0600
  34. @@ -488,11 +488,11 @@
  35. /* Accept a comma-separated list of types, and try them one by one */
  36. /* A list like "nonfs,.." indicates types not to use */
  37. - if (*types && strncmp(*types, "no", 2) && index(*types,',')) {
  38. + if (*types && strncmp(*types, "no", 2) && strchr(*types,',')) {
  39. char *t = strdup(*types);
  40. char *p;
  41. - while((p = index(t,',')) != NULL) {
  42. + while((p = strchr(t,',')) != NULL) {
  43. *p = 0;
  44. args.type = *types = t;
  45. if(do_mount_syscall (&args) == 0)