OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../mdadm/64.patch
  5. # Copyright (C) 2008 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. when cross compiling against dietlibc:
  17. sysfs.c: In function 'sysfs_read':
  18. sysfs.c:81: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
  19. but when compiled for i386:
  20. sysfs.c: In function 'sysfs_read':
  21. sysfs.c:81: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'int'
  22. --- ./sysfs.c.orig 2008-03-11 00:17:59.000000000 +0000
  23. +++ ./sysfs.c 2008-03-11 00:28:05.000000000 +0000
  24. @@ -78,9 +78,9 @@
  25. struct stat stb;
  26. if (fstat(fd, &stb)) return NULL;
  27. if (major(stb.st_rdev)==9)
  28. - sprintf(sra->name, "md%d", minor(stb.st_rdev));
  29. + sprintf(sra->name, "md%d", (int) minor(stb.st_rdev));
  30. else
  31. sprintf(sra->name, "md_d%d",
  32. - minor(stb.st_rdev)>>MdpMinorShift);
  33. + (int) minor(stb.st_rdev)>>MdpMinorShift);
  34. } else {
  35. if (devnum >= 0)
  36. @@ -232,10 +232,10 @@
  37. int n;
  38. if (fstat(fd, &stb)) return 0;
  39. if (major(stb.st_rdev) == 9)
  40. sprintf(fname, "/sys/block/md%d/md/component_size",
  41. - minor(stb.st_rdev));
  42. + (int) minor(stb.st_rdev));
  43. else
  44. sprintf(fname, "/sys/block/md_d%d/md/component_size",
  45. - minor(stb.st_rdev)>>MdpMinorShift);
  46. + (int) minor(stb.st_rdev)>>MdpMinorShift);
  47. fd = open(fname, O_RDONLY);
  48. if (fd < 0)