source: freewrt/tools/jffs2/patches/010-portability.patch@ a59bb75

freewrt_1_0 freewrt_2_0
Last change on this file since a59bb75 was a59bb75, checked in by Thorsten Glaser <tg@…>, 19 years ago

fix build (it was actually a CFLAGS abuse,
the build honours (HOST)CC/CFLAGS now)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@250 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[ba3f8b9]1$FreeWRT$
2
3 portability fixes
4
5--- mtd-20050122.orig/util/Makefile.orig Fri Jan 21 22:59:51 2005
6+++ mtd-20050122.orig/util/Makefile Sun Jun 18 18:38:34 2006
7@@ -23,7 +19,7 @@ SYMLINKS = compr_lzari.c compr_lzo.c
8 $(CC) $(LDFLAGS) -g -o $@ $^
9
10 %.o: %.c
11- $(CC) $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,.$<.dep
[a59bb75]12+ $(CC) -include param.h $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,.$<.dep
[ba3f8b9]13
14 .SUFFIXES:
15
16@@ -38,7 +34,7 @@ clean:
17 $(SYMLINKS):
18 ln -sf ../fs/jffs2/$@ $@
19
20-mkfs.jffs2: crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr.o compr_lzari.o compr_lzo.o
21+mkfs.jffs2: crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr.o compr_lzari.o compr_lzo.o getline.o
22 $(CC) $(LDFLAGS) -o $@ $^ -lz
23
24 flash_eraseall: crc32.o flash_eraseall.o
25--- mtd-20050122.orig/util/compr_zlib.c.orig Wed Jun 23 21:59:52 2004
26+++ mtd-20050122.orig/util/compr_zlib.c Sun Jun 18 18:31:15 2006
27@@ -38,7 +38,9 @@
28 #include <stdint.h>
29 #include <zlib.h>
30 #include <stdio.h>
31+#ifdef __linux__
32 #include <asm/types.h>
33+#endif
34 #include <linux/jffs2.h>
35 #include "compr.h"
36
37--- mtd-20050122.orig/util/mkfs.jffs2.c.orig Fri Nov 26 22:59:51 2004
38+++ mtd-20050122.orig/util/mkfs.jffs2.c Sun Jun 18 18:30:30 2006
39@@ -68,6 +68,7 @@
40 #include <zlib.h>
41 #undef crc32
42 #include "crc32.h"
43+#include <endian.h>
44
45 /* Do not use the wierd XPG version of basename */
46 #undef basename
47@@ -1032,7 +1033,7 @@ static void recursive_populate_directory
48 case S_IFDIR:
49 if (verbose) {
50 printf("\td %04o %9lu %5d:%-3d %s\n",
51- e->sb.st_mode & ~S_IFMT, e->sb.st_size,
52+ e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
53 (int) (e->sb.st_uid), (int) (e->sb.st_gid),
54 e->name);
55 }
56@@ -1041,7 +1042,7 @@ static void recursive_populate_directory
57 case S_IFSOCK:
58 if (verbose) {
59 printf("\ts %04o %9lu %5d:%-3d %s\n",
60- e->sb.st_mode & ~S_IFMT, e->sb.st_size,
61+ e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
62 (int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
63 }
64 write_pipe(e);
65@@ -1049,7 +1050,7 @@ static void recursive_populate_directory
66 case S_IFIFO:
67 if (verbose) {
68 printf("\tp %04o %9lu %5d:%-3d %s\n",
69- e->sb.st_mode & ~S_IFMT, e->sb.st_size,
70+ e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
71 (int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
72 }
73 write_pipe(e);
74@@ -1075,7 +1076,7 @@ static void recursive_populate_directory
75 case S_IFLNK:
76 if (verbose) {
77 printf("\tl %04o %9lu %5d:%-3d %s -> %s\n",
78- e->sb.st_mode & ~S_IFMT, e->sb.st_size,
79+ e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
80 (int) e->sb.st_uid, (int) e->sb.st_gid, e->name,
81 e->link);
82 }
83@@ -1084,7 +1085,7 @@ static void recursive_populate_directory
84 case S_IFREG:
85 if (verbose) {
86 printf("\tf %04o %9lu %5d:%-3d %s\n",
87- e->sb.st_mode & ~S_IFMT, e->sb.st_size,
88+ e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
89 (int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
90 }
91 write_regular_file(e);
Note: See TracBrowser for help on using the repository browser.