summaryrefslogtreecommitdiff
path: root/recipes/modutils/files/gcc4.patch
blob: e204898f0561566c70405fcfdf20c9a76fc0705a (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
--- modutils-2.4.27/depmod/depmod.c.old	2005-06-05 23:25:28.000000000 +0100
+++ modutils-2.4.27/depmod/depmod.c	2005-06-05 23:25:38.000000000 +0100
@@ -1133,7 +1133,7 @@
 
 		for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
 			if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
-				((char *)ksym->name) += 8;
+				ksym->name += 8;
 			assert(n_syms < MAX_MAP_SYM);
 			symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
 		}
--- modutils-2.4.27/genksyms/genksyms.c.old	2005-06-05 23:24:16.000000000 +0100
+++ modutils-2.4.27/genksyms/genksyms.c	2005-06-05 23:24:35.000000000 +0100
@@ -45,7 +45,7 @@
 int flag_debug, flag_dump_defs, flag_warnings;
 int checksum_version = 1, kernel_version = version(2,0,0);
 
-static int errors;
+int errors;
 static int nsyms;
 
 static struct symbol *expansion_trail;
--- modutils-2.4.27/insmod/insmod.c.old	2005-06-05 23:21:47.000000000 +0100
+++ modutils-2.4.27/insmod/insmod.c	2005-06-05 23:22:34.000000000 +0100
@@ -275,7 +275,7 @@
 		if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
 			gplonly_seen = 1;
 			if (gpl)
-				((char *)s->name) += 8;
+				s->name += 8;
 			else
 				continue;
 		}
--- modutils-2.4.27/obj/obj_kallsyms.c.old	2005-06-05 23:20:08.000000000 +0100
+++ modutils-2.4.27/obj/obj_kallsyms.c	2005-06-05 23:20:24.000000000 +0100
@@ -200,7 +200,7 @@
 
     /* Initial contents, header + one entry per input section.  No strings. */
     osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
-    a_hdr = (struct kallsyms_header *) osec->contents =
+    a_hdr = osec->contents =
     	xmalloc(osec->header.sh_size);
     memset(osec->contents, 0, osec->header.sh_size);
     a_hdr->size = sizeof(*a_hdr);
@@ -275,7 +275,7 @@
 	a_hdr->symbol_off +
 	a_hdr->symbols*a_hdr->symbol_size +
 	strings_size - strings_left;
-    a_hdr = (struct kallsyms_header *) osec->contents =
+    a_hdr = osec->contents =
 	xrealloc(a_hdr, a_hdr->total_size);
     p = (char *)a_hdr + a_hdr->symbol_off;
     memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
--- modutils-2.4.27/obj/obj_mips.c.orig	2003-04-05 00:47:17.000000000 +0200
+++ modutils-2.4.27/obj/obj_mips.c	2005-07-21 12:51:48.000000000 +0200
@@ -244,7 +244,9 @@
   archdata_sec->header.sh_size = 0;
   sec = obj_find_section(f, "__dbe_table");
   if (sec) {
-    ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
+/*    ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));*/
+    archdata_sec->contents = xmalloc(sizeof(*ad));
+    ad = (struct archdata *) (archdata_sec->contents);
     memset(ad, 0, sizeof(*ad));
     archdata_sec->header.sh_size = sizeof(*ad);
     ad->__start___dbe_table = sec->header.sh_addr;