# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/util-linux/define_changes_26headers.patch # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- gentoo's util-linux-2.12-linux-headers-2.6.0-fix.patch, with my_dev_t defined as __u32 not int (__kernel_dev_t is __u32) --- ./disk-utils/blockdev.c.orig 2002-03-09 00:57:02.000000000 +0200 +++ ./disk-utils/blockdev.c 2004-04-14 20:02:17.000000000 +0300 @@ -9,6 +9,7 @@ #include #include #include +#include #include "nls.h" @@ -24,8 +25,13 @@ #define BLKRASET _IO(0x12,98) #define BLKRAGET _IO(0x12,99) #define BLKSSZGET _IO(0x12,104) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) #define BLKBSZGET _IOR(0x12,112,sizeof(int)) #define BLKBSZSET _IOW(0x12,113,sizeof(int)) +#else +#define BLKBSZGET _IOR(0x12,112,int) +#define BLKBSZSET _IOW(0x12,113,int) +#endif #endif /* Maybe could be included */ --- ./disk-utils/elvtune.c.orig 2002-03-09 00:57:49.000000000 +0200 +++ ./disk-utils/elvtune.c 2004-04-14 20:02:17.000000000 +0300 @@ -26,6 +26,8 @@ #include #include #include +#include + #include "nls.h" /* this has to match with the kernel structure */ @@ -37,8 +39,13 @@ int max_bomb_segments; } blkelv_ioctl_arg_t; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) #define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t)) #define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t)) +#else +#define BLKELVGET _IOR(0x12,106,blkelv_ioctl_arg_t) +#define BLKELVSET _IOW(0x12,107,blkelv_ioctl_arg_t) +#endif static void usage(void) { --- ./fdisk/common.h.orig 2003-07-13 16:59:53.000000000 +0300 +++ ./fdisk/common.h 2004-04-14 20:02:17.000000000 +0300 @@ -2,11 +2,18 @@ /* including fails */ #include +#include + #define BLKRRPART _IO(0x12,95) /* re-read partition table */ #define BLKGETSIZE _IO(0x12,96) /* return device size */ #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ #define BLKSSZGET _IO(0x12,104) /* get block device sector size */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) #define BLKGETSIZE64 _IOR(0x12,114,8) /* 8 = sizeof(u64) */ +#else +#define BLKGETSIZE64 _IOR(0x12,114,unsigned long long) +#endif /* including also fails */ struct hd_geometry { --- ./mount/my_dev_t.h.orig 2003-07-16 23:05:50.000000000 +0300 +++ ./mount/my_dev_t.h 2004-04-14 20:05:59.000000000 +0300 @@ -4,4 +4,11 @@ /* for ancient systems use "unsigned short" */ #include +#include + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) #define my_dev_t __kernel_dev_t +#else +#include +#define my_dev_t __u32 +#endif --- util-linux-2.12a/disk-utils/fdformat.c~ 2002-07-07 14:38:24.000000000 +0200 +++ util-linux-2.12a/disk-utils/fdformat.c 2004-06-22 05:03:03.607542024 +0200 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "nls.h" --- util-linux-2.12a/disk-utils/setfdprm.c~ 2001-10-21 12:32:27.000000000 +0200 +++ util-linux-2.12a/disk-utils/setfdprm.c 2004-06-22 05:25:44.739618496 +0200 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "nls.h" --- util-linux-2.12a/partx/addpart.c~ 1999-07-09 04:56:36.000000000 +0200 +++ util-linux-2.12a/partx/addpart.c 2004-06-22 05:28:41.731711608 +0200 @@ -3,6 +3,7 @@ #include #include #include +#include #include int --- util-linux-2.12a/partx/delpart.c~ 1999-07-09 04:56:36.000000000 +0200 +++ util-linux-2.12a/partx/delpart.c 2004-06-22 05:30:16.806258080 +0200 @@ -3,6 +3,7 @@ #include #include #include +#include #include int --- util-linux-2.12a/partx/partx.c~ 2002-10-31 14:51:06.000000000 +0100 +++ util-linux-2.12a/partx/partx.c 2004-06-22 05:32:07.710398088 +0200 @@ -37,6 +37,7 @@ #include #include #include +#include #include /* HDIO_GETGEO */ #include #define BLKGETSIZE _IO(0x12,96) /* return device size */