aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mtd-utils/patches/110-portability_fix.patch
blob: b5e91d576bf56fbc7f44727250e301a876b66979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff -urN mtd.old/include/asm/types.h mtd.dev/include/asm/types.h
--- mtd.old/include/asm/types.h	1970-01-01 01:00:00.000000000 +0100
+++ mtd.dev/include/asm/types.h	2006-09-27 16:50:03.000000000 +0200
@@ -0,0 +1,3 @@
+#ifdef linux
+#include_next <asm/types.h>
+#endif
diff -urN mtd.old/util/mkfs.jffs2.c mtd.dev/util/mkfs.jffs2.c
--- mtd.old/util/mkfs.jffs2.c	2004-11-27 00:00:13.000000000 +0100
+++ mtd.dev/util/mkfs.jffs2.c	2006-09-27 16:51:56.000000000 +0200
@@ -68,6 +68,7 @@
 #include <zlib.h>
 #undef crc32
 #include "crc32.h"
+#include <endian.h>
 
 /* Do not use the wierd XPG version of basename */
 #undef basename
@@ -1032,7 +1033,7 @@
 			case S_IFDIR:
 				if (verbose) {
 					printf("\td %04o %9lu %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
 							(int) (e->sb.st_uid), (int) (e->sb.st_gid),
 							e->name);
 				}
@@ -1041,7 +1042,7 @@
 			case S_IFSOCK:
 				if (verbose) {
 					printf("\ts %04o %9lu %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
 							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
 				}
 				write_pipe(e);
@@ -1049,7 +1050,7 @@
 			case S_IFIFO:
 				if (verbose) {
 					printf("\tp %04o %9lu %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
 							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
 				}
 				write_pipe(e);
@@ -1075,7 +1076,7 @@
 			case S_IFLNK:
 				if (verbose) {
 					printf("\tl %04o %9lu %5d:%-3d %s -> %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
 							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name,
 							e->link);
 				}
@@ -1084,7 +1085,7 @@
 			case S_IFREG:
 				if (verbose) {
 					printf("\tf %04o %9lu %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
 							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
 				}
 				write_regular_file(e);