mirror of the now-defunct rocklinux.org
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.

156 lines
5.0 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/util-linux/define_changes_26headers.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. gentoo's util-linux-2.12-linux-headers-2.6.0-fix.patch, with
  20. my_dev_t defined as __u32 not int (__kernel_dev_t is __u32)
  21. --- ./disk-utils/blockdev.c.orig 2002-03-09 00:57:02.000000000 +0200
  22. +++ ./disk-utils/blockdev.c 2004-04-14 20:02:17.000000000 +0300
  23. @@ -9,6 +9,7 @@
  24. #include <string.h>
  25. #include <unistd.h>
  26. #include <sys/ioctl.h>
  27. +#include <linux/version.h>
  28. #include "nls.h"
  29. @@ -24,8 +25,13 @@
  30. #define BLKRASET _IO(0x12,98)
  31. #define BLKRAGET _IO(0x12,99)
  32. #define BLKSSZGET _IO(0x12,104)
  33. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
  34. #define BLKBSZGET _IOR(0x12,112,sizeof(int))
  35. #define BLKBSZSET _IOW(0x12,113,sizeof(int))
  36. +#else
  37. +#define BLKBSZGET _IOR(0x12,112,int)
  38. +#define BLKBSZSET _IOW(0x12,113,int)
  39. +#endif
  40. #endif
  41. /* Maybe <linux/hdreg.h> could be included */
  42. --- ./disk-utils/elvtune.c.orig 2002-03-09 00:57:49.000000000 +0200
  43. +++ ./disk-utils/elvtune.c 2004-04-14 20:02:17.000000000 +0300
  44. @@ -26,6 +26,8 @@
  45. #include <sys/ioctl.h>
  46. #include <unistd.h>
  47. #include <stdlib.h>
  48. +#include <linux/version.h>
  49. +
  50. #include "nls.h"
  51. /* this has to match with the kernel structure */
  52. @@ -37,8 +39,13 @@
  53. int max_bomb_segments;
  54. } blkelv_ioctl_arg_t;
  55. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
  56. #define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))
  57. #define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))
  58. +#else
  59. +#define BLKELVGET _IOR(0x12,106,blkelv_ioctl_arg_t)
  60. +#define BLKELVSET _IOW(0x12,107,blkelv_ioctl_arg_t)
  61. +#endif
  62. static void
  63. usage(void) {
  64. --- ./fdisk/common.h.orig 2003-07-13 16:59:53.000000000 +0300
  65. +++ ./fdisk/common.h 2004-04-14 20:02:17.000000000 +0300
  66. @@ -2,11 +2,18 @@
  67. /* including <linux/fs.h> fails */
  68. #include <sys/ioctl.h>
  69. +#include <linux/version.h>
  70. +
  71. #define BLKRRPART _IO(0x12,95) /* re-read partition table */
  72. #define BLKGETSIZE _IO(0x12,96) /* return device size */
  73. #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
  74. #define BLKSSZGET _IO(0x12,104) /* get block device sector size */
  75. +
  76. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
  77. #define BLKGETSIZE64 _IOR(0x12,114,8) /* 8 = sizeof(u64) */
  78. +#else
  79. +#define BLKGETSIZE64 _IOR(0x12,114,unsigned long long)
  80. +#endif
  81. /* including <linux/hdreg.h> also fails */
  82. struct hd_geometry {
  83. --- ./mount/my_dev_t.h.orig 2003-07-16 23:05:50.000000000 +0300
  84. +++ ./mount/my_dev_t.h 2004-04-14 20:05:59.000000000 +0300
  85. @@ -4,4 +4,11 @@
  86. /* for ancient systems use "unsigned short" */
  87. #include <linux/posix_types.h>
  88. +#include <linux/version.h>
  89. +
  90. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
  91. #define my_dev_t __kernel_dev_t
  92. +#else
  93. +#include <asm/types.h>
  94. +#define my_dev_t __u32
  95. +#endif
  96. --- util-linux-2.12a/disk-utils/fdformat.c~ 2002-07-07 14:38:24.000000000 +0200
  97. +++ util-linux-2.12a/disk-utils/fdformat.c 2004-06-22 05:03:03.607542024 +0200
  98. @@ -14,6 +14,7 @@
  99. #include <stdlib.h>
  100. #include <sys/stat.h>
  101. #include <sys/ioctl.h>
  102. +#include <linux/compiler.h>
  103. #include <linux/fd.h>
  104. #include "nls.h"
  105. --- util-linux-2.12a/disk-utils/setfdprm.c~ 2001-10-21 12:32:27.000000000 +0200
  106. +++ util-linux-2.12a/disk-utils/setfdprm.c 2004-06-22 05:25:44.739618496 +0200
  107. @@ -13,6 +13,7 @@
  108. #include <sys/types.h>
  109. #include <sys/stat.h>
  110. #include <sys/ioctl.h>
  111. +#include <linux/compiler.h>
  112. #include <linux/fd.h>
  113. #include "nls.h"
  114. --- util-linux-2.12a/partx/addpart.c~ 1999-07-09 04:56:36.000000000 +0200
  115. +++ util-linux-2.12a/partx/addpart.c 2004-06-22 05:28:41.731711608 +0200
  116. @@ -3,6 +3,7 @@
  117. #include <fcntl.h>
  118. #include <stdlib.h>
  119. #include <sys/ioctl.h>
  120. +#include <linux/compiler.h>
  121. #include <linux/blkpg.h>
  122. int
  123. --- util-linux-2.12a/partx/delpart.c~ 1999-07-09 04:56:36.000000000 +0200
  124. +++ util-linux-2.12a/partx/delpart.c 2004-06-22 05:30:16.806258080 +0200
  125. @@ -3,6 +3,7 @@
  126. #include <fcntl.h>
  127. #include <stdlib.h>
  128. #include <sys/ioctl.h>
  129. +#include <linux/compiler.h>
  130. #include <linux/blkpg.h>
  131. int
  132. --- util-linux-2.12a/partx/partx.c~ 2002-10-31 14:51:06.000000000 +0100
  133. +++ util-linux-2.12a/partx/partx.c 2004-06-22 05:32:07.710398088 +0200
  134. @@ -37,6 +37,7 @@
  135. #include <getopt.h>
  136. #include <unistd.h>
  137. #include <sys/ioctl.h>
  138. +#include <linux/compiler.h>
  139. #include <linux/hdreg.h> /* HDIO_GETGEO */
  140. #include <linux/blkpg.h>
  141. #define BLKGETSIZE _IO(0x12,96) /* return device size */