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.

111 lines
3.5 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/mtools/hotfixes.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 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. diff -Nur ../mtools-3.9.9-orig/devices.h ./devices.h
  20. --- ../mtools-3.9.9-orig/devices.h 2004-11-11 20:54:27.772707216 +0100
  21. +++ ./devices.h 2004-11-11 22:50:38.459001824 +0100
  22. @@ -13,7 +13,15 @@
  23. #endif /* MINOR not defined */
  24. #else
  25. -
  26. +
  27. +#include <linux/version.h>
  28. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
  29. +#define _LINUX_STRING_H_
  30. +#define __KERNEL__
  31. +# include <linux/kdev_t.h>
  32. +# include <linux/list.h>
  33. +#undef __KERNEL__
  34. +#endif /* only for kernel before 2.6.9 */
  35. #include <linux/fs.h> /* get MAJOR/MINOR from Linux kernel */
  36. #ifndef major
  37. #define major(x) MAJOR(x)
  38. diff -Nur ../mtools-3.9.9-orig/mformat.c ./mformat.c
  39. --- ../mtools-3.9.9-orig/mformat.c 2004-11-11 20:54:27.818700224 +0100
  40. +++ ./mformat.c 2004-11-11 22:48:59.010120352 +0100
  41. @@ -27,11 +27,23 @@
  42. #endif
  43. #ifdef OS_linux
  44. +#include <linux/version.h>
  45. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
  46. +#define _LINUX_STRING_H_
  47. +#define __KERNEL__
  48. +# include <linux/kdev_t.h>
  49. +# include <linux/list.h>
  50. +#undef __KERNEL__
  51. +#endif /* only for kernel before 2.6.9 */
  52. #include "linux/hdreg.h"
  53. #define _LINUX_STRING_H_
  54. #define kdev_t int
  55. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
  56. #include "linux/fs.h"
  57. +#else
  58. +#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */
  59. +#endif /* including fs.h only works for kernel before 2.6.9 */
  60. #undef _LINUX_STRING_H_
  61. #endif
  62. diff -Nur ../mtools-3.9.9-orig/mpartition.c ./mpartition.c
  63. --- ../mtools-3.9.9-orig/mpartition.c 2004-11-11 20:54:27.811701288 +0100
  64. +++ ./mpartition.c 2004-11-11 22:49:18.027229312 +0100
  65. @@ -16,11 +16,23 @@
  66. #include "partition.h"
  67. #ifdef OS_linux
  68. +#include <linux/version.h>
  69. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
  70. +#define _LINUX_STRING_H_
  71. +#define __KERNEL__
  72. +# include <linux/kdev_t.h>
  73. +# include <linux/list.h>
  74. +#undef __KERNEL__
  75. +#endif /* only for kernel before 2.6.9 */
  76. #include "linux/hdreg.h"
  77. #define _LINUX_STRING_H_
  78. #define kdev_t int
  79. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
  80. #include "linux/fs.h"
  81. +#else
  82. +#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */
  83. +#endif /* including fs.h only works for kernel before 2.6.9 */
  84. #undef _LINUX_STRING_H_
  85. #endif
  86. diff -Nur ../mtools-3.9.9-orig/mzip.c ./mzip.c
  87. --- ../mtools-3.9.9-orig/mzip.c 2004-11-11 20:54:27.807701896 +0100
  88. +++ ./mzip.c 2004-11-11 22:49:44.624185960 +0100
  89. @@ -30,6 +30,14 @@
  90. #include <sys/mount.h>
  91. #else
  92. #define _LINUX_KDEV_T_H 1 /* don't redefine MAJOR/MINOR */
  93. +#include <linux/version.h>
  94. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
  95. +#define _LINUX_STRING_H_
  96. +#define __KERNEL__
  97. +# include <linux/kdev_t.h>
  98. +# include <linux/list.h>
  99. +#undef __KERNEL__
  100. +#endif /* only for kernel before 2.6.9 */
  101. #include <linux/fs.h>
  102. #endif