summaryrefslogtreecommitdiffstats
path: root/package/util-linux/util-linux-gcc4.patch
blob: a5e915eb6f40bdc9337aa9e4e90f573e14fea0aa (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
diff -urN util-linux-2.12/configure util-linux-2.12-patched/configure
--- util-linux-2.12/configure	2003-07-05 15:06:55.000000000 -0500
+++ util-linux-2.12-patched/configure	2005-06-18 11:36:07.000000000 -0500
@@ -360,6 +360,7 @@
 #
 echo "
 #include <sys/types.h>
+#include <linux/compiler.h>
 #include <linux/cyclades.h>
 int main(){ exit(0); }
 " > conftest.c
diff -urN util-linux-2.12/disk-utils/mkfs.minix.c util-linux-2.12-patched/disk-utils/mkfs.minix.c
--- util-linux-2.12/disk-utils/mkfs.minix.c	2002-10-25 17:25:15.000000000 -0500
+++ util-linux-2.12-patched/disk-utils/mkfs.minix.c	2005-06-18 11:36:07.000000000 -0500
@@ -128,17 +128,17 @@
 static char super_block_buffer[BLOCK_SIZE];
 static char boot_block_buffer[512];
 #define Super (*(struct minix_super_block *)super_block_buffer)
-#define INODES ((unsigned long)Super.s_ninodes)
+#define INODES (Super.s_ninodes)
 #ifdef HAVE_MINIX2
-#define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones))
+#define ZONES ((version2 ? Super.s_zones : Super.s_nzones))
 #else
-#define ZONES ((unsigned long)(Super.s_nzones))
+#define ZONES (Super.s_nzones)
 #endif
-#define IMAPS ((unsigned long)Super.s_imap_blocks)
-#define ZMAPS ((unsigned long)Super.s_zmap_blocks)
-#define FIRSTZONE ((unsigned long)Super.s_firstdatazone)
-#define ZONESIZE ((unsigned long)Super.s_log_zone_size)
-#define MAXSIZE ((unsigned long)Super.s_max_size)
+#define IMAPS (Super.s_imap_blocks)
+#define ZMAPS (Super.s_zmap_blocks)
+#define FIRSTZONE (Super.s_firstdatazone)
+#define ZONESIZE (Super.s_log_zone_size)
+#define MAXSIZE (Super.s_max_size)
 #define MAGIC (Super.s_magic)
 #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS)
 
@@ -475,7 +475,10 @@
 	MAGIC = magic;
 	ZONESIZE = 0;
 	MAXSIZE = version2 ? 0x7fffffff : (7+512+512*512)*1024;
-	ZONES = BLOCKS;
+	if (version2)
+		Super.s_zones = BLOCKS;
+	else
+		Super.s_nzones = BLOCKS;
 
 /* some magic nrs: 1 inode / 3 blocks */
 	if ( req_nr_inodes == 0 ) 
@@ -517,11 +520,11 @@
 	if (!inode_buffer)
 		die(_("unable to allocate buffer for inodes"));
 	memset(inode_buffer,0,INODE_BUFFER_SIZE);
-	printf(_("%ld inodes\n"),INODES);
-	printf(_("%ld blocks\n"),ZONES);
-	printf(_("Firstdatazone=%ld (%ld)\n"),FIRSTZONE,NORM_FIRSTZONE);
+	printf(_("%ld inodes\n"),(unsigned long)INODES);
+	printf(_("%ld blocks\n"),(unsigned long)ZONES);
+	printf(_("Firstdatazone=%ld (%ld)\n"),(unsigned long)FIRSTZONE,(unsigned long)NORM_FIRSTZONE);
 	printf(_("Zonesize=%d\n"),BLOCK_SIZE<<ZONESIZE);
-	printf(_("Maxsize=%ld\n\n"),MAXSIZE);
+	printf(_("Maxsize=%ld\n\n"),(unsigned long)MAXSIZE);
 }
 
 /*
diff -urN util-linux-2.12/sys-utils/cytune.c util-linux-2.12-patched/sys-utils/cytune.c
--- util-linux-2.12/sys-utils/cytune.c	2002-03-08 17:04:30.000000000 -0600
+++ util-linux-2.12-patched/sys-utils/cytune.c	2005-06-18 11:36:51.000000000 -0500
@@ -58,6 +58,7 @@
 #include <linux/tqueue.h>	/* required for old kernels (for struct tq_struct) */
 				/* compilation errors on other kernels */
 #endif
+#include <linux/compiler.h>
 #include <linux/cyclades.h>
 
 #if 0