util-linux-gcc4.patch 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. diff -urN util-linux-2.12/configure util-linux-2.12-patched/configure
  2. --- util-linux-2.12/configure 2003-07-05 15:06:55.000000000 -0500
  3. +++ util-linux-2.12-patched/configure 2005-06-18 11:36:07.000000000 -0500
  4. @@ -360,6 +360,7 @@
  5. #
  6. echo "
  7. #include <sys/types.h>
  8. +#include <linux/compiler.h>
  9. #include <linux/cyclades.h>
  10. int main(){ exit(0); }
  11. " > conftest.c
  12. diff -urN util-linux-2.12/disk-utils/mkfs.minix.c util-linux-2.12-patched/disk-utils/mkfs.minix.c
  13. --- util-linux-2.12/disk-utils/mkfs.minix.c 2002-10-25 17:25:15.000000000 -0500
  14. +++ util-linux-2.12-patched/disk-utils/mkfs.minix.c 2005-06-18 11:36:07.000000000 -0500
  15. @@ -128,17 +128,17 @@
  16. static char super_block_buffer[BLOCK_SIZE];
  17. static char boot_block_buffer[512];
  18. #define Super (*(struct minix_super_block *)super_block_buffer)
  19. -#define INODES ((unsigned long)Super.s_ninodes)
  20. +#define INODES (Super.s_ninodes)
  21. #ifdef HAVE_MINIX2
  22. -#define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones))
  23. +#define ZONES ((version2 ? Super.s_zones : Super.s_nzones))
  24. #else
  25. -#define ZONES ((unsigned long)(Super.s_nzones))
  26. +#define ZONES (Super.s_nzones)
  27. #endif
  28. -#define IMAPS ((unsigned long)Super.s_imap_blocks)
  29. -#define ZMAPS ((unsigned long)Super.s_zmap_blocks)
  30. -#define FIRSTZONE ((unsigned long)Super.s_firstdatazone)
  31. -#define ZONESIZE ((unsigned long)Super.s_log_zone_size)
  32. -#define MAXSIZE ((unsigned long)Super.s_max_size)
  33. +#define IMAPS (Super.s_imap_blocks)
  34. +#define ZMAPS (Super.s_zmap_blocks)
  35. +#define FIRSTZONE (Super.s_firstdatazone)
  36. +#define ZONESIZE (Super.s_log_zone_size)
  37. +#define MAXSIZE (Super.s_max_size)
  38. #define MAGIC (Super.s_magic)
  39. #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS)
  40. @@ -475,7 +475,10 @@
  41. MAGIC = magic;
  42. ZONESIZE = 0;
  43. MAXSIZE = version2 ? 0x7fffffff : (7+512+512*512)*1024;
  44. - ZONES = BLOCKS;
  45. + if (version2)
  46. + Super.s_zones = BLOCKS;
  47. + else
  48. + Super.s_nzones = BLOCKS;
  49. /* some magic nrs: 1 inode / 3 blocks */
  50. if ( req_nr_inodes == 0 )
  51. @@ -517,11 +520,11 @@
  52. if (!inode_buffer)
  53. die(_("unable to allocate buffer for inodes"));
  54. memset(inode_buffer,0,INODE_BUFFER_SIZE);
  55. - printf(_("%ld inodes\n"),INODES);
  56. - printf(_("%ld blocks\n"),ZONES);
  57. - printf(_("Firstdatazone=%ld (%ld)\n"),FIRSTZONE,NORM_FIRSTZONE);
  58. + printf(_("%ld inodes\n"),(unsigned long)INODES);
  59. + printf(_("%ld blocks\n"),(unsigned long)ZONES);
  60. + printf(_("Firstdatazone=%ld (%ld)\n"),(unsigned long)FIRSTZONE,(unsigned long)NORM_FIRSTZONE);
  61. printf(_("Zonesize=%d\n"),BLOCK_SIZE<<ZONESIZE);
  62. - printf(_("Maxsize=%ld\n\n"),MAXSIZE);
  63. + printf(_("Maxsize=%ld\n\n"),(unsigned long)MAXSIZE);
  64. }
  65. /*
  66. diff -urN util-linux-2.12/sys-utils/cytune.c util-linux-2.12-patched/sys-utils/cytune.c
  67. --- util-linux-2.12/sys-utils/cytune.c 2002-03-08 17:04:30.000000000 -0600
  68. +++ util-linux-2.12-patched/sys-utils/cytune.c 2005-06-18 11:36:51.000000000 -0500
  69. @@ -58,6 +58,7 @@
  70. #include <linux/tqueue.h> /* required for old kernels (for struct tq_struct) */
  71. /* compilation errors on other kernels */
  72. #endif
  73. +#include <linux/compiler.h>
  74. #include <linux/cyclades.h>
  75. #if 0