]> git.pld-linux.org Git - packages/util-linux.git/blame_incremental - util-linux-blk.patch
- orphaned, outdated
[packages/util-linux.git] / util-linux-blk.patch
... / ...
CommitLineData
1diff -urN util-linux-2.12q.org/disk-utils/blockdev.c util-linux-2.12q/disk-utils/blockdev.c
2--- util-linux-2.12q.org/disk-utils/blockdev.c 2004-08-18 19:52:20.000000000 +0200
3+++ util-linux-2.12q/disk-utils/blockdev.c 2005-02-27 19:35:19.000000000 +0100
4@@ -9,9 +9,14 @@
5 #include <string.h>
6 #include <unistd.h>
7 #include <sys/ioctl.h>
8+#include <linux/version.h>
9
10 #include "nls.h"
11
12+#ifdef LIBC_HEADERS_VERSION
13+/* Fixed headers detected */
14+#include <linux/fs.h>
15+#else
16 /* Since it is impossible to include <linux/fs.h>, let us
17 give the ioctls explicitly. */
18
19@@ -28,6 +33,7 @@
20 #define BLKBSZSET _IOW(0x12,113,size_t)
21 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
22 #endif
23+#endif
24
25 /* Maybe <linux/hdreg.h> could be included */
26 #ifndef HDIO_GETGEO
27diff -urN util-linux-2.12q.org/disk-utils/elvtune.c util-linux-2.12q/disk-utils/elvtune.c
28--- util-linux-2.12q.org/disk-utils/elvtune.c 2004-09-19 15:57:09.000000000 +0200
29+++ util-linux-2.12q/disk-utils/elvtune.c 2005-02-27 19:34:27.000000000 +0100
30@@ -29,6 +29,7 @@
31 #include <string.h>
32 #include <sys/ioctl.h>
33 #include <sys/utsname.h>
34+#include <linux/version.h>
35 #include "nls.h"
36
37 /* this has to match with the kernel structure */
38@@ -40,9 +41,14 @@
39 int max_bomb_segments;
40 } blkelv_ioctl_arg_t;
41
42+#ifdef LIBC_HEADERS_VERSION
43+/* Fixed headers detected */
44+#include <linux/fs.h>
45+#else
46 /* ioctls introduced in 2.2.16, removed in 2.5.58 */
47 #define BLKELVGET _IOR(0x12,106,size_t)
48 #define BLKELVSET _IOW(0x12,107,size_t)
49+#endif
50
51 static void
52 usage(void) {
53diff -urN util-linux-2.12q.org/fdisk/common.h util-linux-2.12q/fdisk/common.h
54--- util-linux-2.12q.org/fdisk/common.h 2004-09-06 20:07:11.000000000 +0200
55+++ util-linux-2.12q/fdisk/common.h 2005-02-27 19:35:53.000000000 +0100
56@@ -3,11 +3,18 @@
57 /* including <linux/fs.h> fails */
58 #include <sys/types.h>
59 #include <sys/ioctl.h>
60+#include <linux/version.h>
61+
62+#ifdef LIBC_HEADERS_VERSION
63+/* Fixed headers detected */
64+#include <linux/fs.h>
65+#else
66 #define BLKRRPART _IO(0x12,95) /* re-read partition table */
67 #define BLKGETSIZE _IO(0x12,96) /* return device size */
68 #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
69 #define BLKSSZGET _IO(0x12,104) /* get block device sector size */
70 #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* size in bytes */
71+#endif
72
73 /* including <linux/hdreg.h> also fails */
74 struct hd_geometry {
This page took 0.077138 seconds and 4 git commands to generate.