]> git.wh0rd.org - patches.git/blob - uclinux-flashw-cleanup.patch
2218a46d6b354cb39138adaa722d0735a8fd2ddb
[patches.git] / uclinux-flashw-cleanup.patch
1 Index: user/flashw/flashw.c
2 ===================================================================
3 RCS file: /var/cvs/uClinux-dist/user/flashw/flashw.c,v
4 retrieving revision 1.1.1.6
5 diff -u -p -r1.1.1.6 flashw.c
6 --- user/flashw/flashw.c 12 Jul 2006 05:10:36 -0000 1.1.1.6
7 +++ user/flashw/flashw.c 7 Jan 2007 13:59:22 -0000
8 @@ -10,6 +10,7 @@
9
10 /*****************************************************************************/
11
12 +#define _GNU_SOURCE
13 #include <stdio.h>
14 #include <fcntl.h>
15 #include <getopt.h>
16 @@ -20,20 +21,23 @@
17 #include <sys/ioctl.h>
18 #include <sys/types.h>
19 #include <sys/stat.h>
20 -#include <linux/config.h>
21 #include <linux/version.h>
22 -#ifdef CONFIG_MTD
23 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8)
24 -#include <mtd/mtd-user.h>
25 -#else
26 -#include <linux/mtd/mtd.h>
27 -#endif
28 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
29 +# include <mtd/mtd-user.h>
30 +# define CONFIG_MTD
31 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8)
32 +# include <linux/config.h>
33 +# ifdef CONFIG_MTD
34 +# include <mtd/mtd-user.h>
35 +# else
36 +# include <linux/mtd/mtd.h>
37 +# endif
38 #else
39 -#include <linux/blkmem.h>
40 +# include <linux/blkmem.h>
41 #endif
42 #if defined(CONFIG_NFTL_RW) && !defined(NFTL_MAJOR)
43 - #define NFTL_MAJOR 93
44 - #include <sys/mount.h>
45 +# define NFTL_MAJOR 93
46 +# include <sys/mount.h>
47 #endif
48 #include <dirent.h>
49