1 --- util-linux-2.12/disk-utils/elvtune.c.orig 2002-03-08 23:57:49.000000000 +0100
2 +++ util-linux-2.12/disk-utils/elvtune.c 2004-02-23 23:07:41.428306200 +0100
7 +#include <linux/version.h>
9 /* this has to match with the kernel structure */
10 /* current version for ac19 and 2.2.16 */
12 int max_bomb_segments;
15 -#define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))
16 -#define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))
17 +#ifdef LIBC_HEADERS_VERSION
18 +/* Fixed headers detected */
19 +#include <linux/fs.h>
21 +#define BLKELVGET _IOR(0x12,106,size_t) /* blkelv_ioctl_arg_t broken by sizeof */
22 +#define BLKELVSET _IOW(0x12,107,size_t) /* blkelv_ioctl_arg_t broken by sizeof */
27 --- util-linux-2.12/disk-utils/blockdev.c.orig 2002-03-08 23:57:02.000000000 +0100
28 +++ util-linux-2.12/disk-utils/blockdev.c 2004-02-23 23:08:09.053106592 +0100
32 #include <sys/ioctl.h>
33 +#include <linux/version.h>
37 -/* Since it is impossible to include <linux/fs.h>, let us
38 - give the ioctls explicitly. */
40 +#ifdef LIBC_HEADERS_VERSION
41 +/* Fixed headers detected */
42 +#include <linux/fs.h>
45 #define BLKROSET _IO(0x12,93)
46 #define BLKROGET _IO(0x12,94)
48 #define BLKRASET _IO(0x12,98)
49 #define BLKRAGET _IO(0x12,99)
50 #define BLKSSZGET _IO(0x12,104)
51 -#define BLKBSZGET _IOR(0x12,112,sizeof(int))
52 -#define BLKBSZSET _IOW(0x12,113,sizeof(int))
53 +#define BLKBSZGET _IOR(0x12,112,size_t) /* int broken by sizeof */
54 +#define BLKBSZSET _IOW(0x12,113,size_t) /* int broken by sizeof */
58 /* Maybe <linux/hdreg.h> could be included */
59 --- util-linux-2.12/fdisk/common.h.orig 2003-07-13 15:59:53.000000000 +0200
60 +++ util-linux-2.12/fdisk/common.h 2004-02-23 23:09:39.330382360 +0100
62 /* common stuff for fdisk, cfdisk, sfdisk */
64 -/* including <linux/fs.h> fails */
65 #include <sys/ioctl.h>
66 +#include <linux/version.h>
68 +#ifdef LIBC_HEADERS_VERSION
69 +/* Fixed headers detected */
70 +#include <linux/fs.h>
72 #define BLKRRPART _IO(0x12,95) /* re-read partition table */
73 #define BLKGETSIZE _IO(0x12,96) /* return device size */
74 #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
75 #define BLKSSZGET _IO(0x12,104) /* get block device sector size */
76 -#define BLKGETSIZE64 _IOR(0x12,114,8) /* 8 = sizeof(u64) */
77 +#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* u64 broken by sizeof; NOT 8(==int)!!! */
80 /* including <linux/hdreg.h> also fails */