summaryrefslogtreecommitdiff
path: root/recipes/modutils/files/gcc4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/modutils/files/gcc4.patch')
-rw-r--r--recipes/modutils/files/gcc4.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/recipes/modutils/files/gcc4.patch b/recipes/modutils/files/gcc4.patch
new file mode 100644
index 0000000000..e204898f05
--- /dev/null
+++ b/recipes/modutils/files/gcc4.patch
@@ -0,0 +1,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;