6907c2dd8e297fefa72cf8e01bc036126dd538b5
[openwrt/svn-archive/archive.git] / utils / dosfstools / patches / 002-linux_26_headers.patch
1 --- a/dosfsck/common.h
2 +++ b/dosfsck/common.h
3 @@ -4,9 +4,7 @@
4
5 #include <linux/version.h>
6 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
7 -# define __KERNEL__
8 -# include <asm/types.h>
9 -# undef __KERNEL__
10 +#include <linux/types.h>
11 # define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
12 #endif
13
14 --- a/dosfsck/file.c
15 +++ b/dosfsck/file.c
16 @@ -18,9 +18,7 @@
17
18 #include <linux/version.h>
19 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
20 -# define __KERNEL__
21 -# include <asm/types.h>
22 -# undef __KERNEL__
23 +#include <linux/types.h>
24 #endif
25
26 #include <linux/msdos_fs.h>
27 --- a/dosfsck/io.c
28 +++ b/dosfsck/io.c
29 @@ -19,6 +19,10 @@
30 #include <sys/ioctl.h>
31 #include <errno.h>
32 #include <fcntl.h>
33 +#include <linux/version.h>
34 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
35 +#include <linux/types.h>
36 +#endif
37 #include <linux/fd.h>
38
39 #include "dosfsck.h"
40 --- a/mkdosfs/mkdosfs.c
41 +++ b/mkdosfs/mkdosfs.c
42 @@ -68,9 +68,7 @@
43
44 #include <linux/version.h>
45 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
46 -# define __KERNEL__
47 -# include <asm/types.h>
48 -# undef __KERNEL__
49 +#include <linux/types.h>
50 #endif
51
52 #if __BYTE_ORDER == __BIG_ENDIAN
53 --- a/dosfsck/dosfsck.h
54 +++ b/dosfsck/dosfsck.h
55 @@ -15,13 +15,7 @@
56 #define _LINUX_FS_H /* hack to avoid inclusion of <linux/fs.h> */
57
58 #include <linux/version.h>
59 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
60 -# define __KERNEL__
61 -# include <asm/types.h>
62 -# include <asm/byteorder.h>
63 -# undef __KERNEL__
64 -#endif
65 -
66 +#include <linux/types.h>
67 #include <linux/msdos_fs.h>
68
69 #undef CF_LE_W