Bug#294474: busybox: FTBFS (amd64/gcc-4.0): conflicting types for 'build_bl_tree'
The attached updated patch makes the latest version of 'busybox' compile
with gcc-4.0 on amd64.
Regards
Andreas Jochens
diff -urN ../tmp-orig/busybox-1.00/archival/gzip.c ./archival/gzip.c
--- ../tmp-orig/busybox-1.00/archival/gzip.c 2004-04-15 22:52:48.000000000 +0200
+++ ./archival/gzip.c 2005-06-15 10:52:24.000000000 +0200
@@ -2162,7 +2162,7 @@
* Construct the Huffman tree for the bit lengths and return the index in
* bl_order of the last bit length code to send.
*/
-static const int build_bl_tree()
+static int build_bl_tree()
{
int max_blindex; /* index of last bit length code of non zero freq */
diff -urN ../tmp-orig/busybox-1.00/modutils/obj/depmod.c ./modutils/obj/depmod.c
--- ../tmp-orig/busybox-1.00/modutils/obj/depmod.c 2005-06-15 11:54:49.000000000 +0200
+++ ./modutils/obj/depmod.c 2005-06-15 11:51:56.000000000 +0200
@@ -642,7 +642,7 @@
for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
- ((char *)ksym->name) += 8;
+ ksym->name = ((char *)ksym->name) + 8;
assert(n_syms < MAX_MAP_SYM);
symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
}
diff -urN ../tmp-orig/busybox-1.00/modutils/obj/insmod.c ./modutils/obj/insmod.c
--- ../tmp-orig/busybox-1.00/modutils/obj/insmod.c 2005-06-15 11:54:49.000000000 +0200
+++ ./modutils/obj/insmod.c 2005-06-15 11:52:20.000000000 +0200
@@ -119,7 +119,7 @@
if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
gplonly_seen = 1;
if (gpl)
- ((char *)s->name) += 8;
+ s->name = ((char *)s->name) + 8;
else
continue;
}
diff -urN ../tmp-orig/busybox-1.00/modutils/obj/obj_kallsyms.c ./modutils/obj/obj_kallsyms.c
--- ../tmp-orig/busybox-1.00/modutils/obj/obj_kallsyms.c 2005-06-15 11:54:49.000000000 +0200
+++ ./modutils/obj/obj_kallsyms.c 2005-06-15 11:53:30.000000000 +0200
@@ -200,8 +200,8 @@
/* 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 =
- xmalloc(osec->header.sh_size);
+ osec->contents = xmalloc(osec->header.sh_size);
+ a_hdr = (struct kallsyms_header *) osec->contents;
memset(osec->contents, 0, osec->header.sh_size);
a_hdr->size = sizeof(*a_hdr);
a_hdr->sections = loaded;
@@ -275,8 +275,8 @@
a_hdr->symbol_off +
a_hdr->symbols*a_hdr->symbol_size +
strings_size - strings_left;
- a_hdr = (struct kallsyms_header *) osec->contents =
- xrealloc(a_hdr, a_hdr->total_size);
+ osec->contents = xrealloc(a_hdr, a_hdr->total_size);
+ a_hdr = (struct kallsyms_header *) osec->contents;
p = (char *)a_hdr + a_hdr->symbol_off;
memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
free(symbols);
diff -urN ../tmp-orig/busybox-1.00/networking/ifupdown.c ./networking/ifupdown.c
--- ../tmp-orig/busybox-1.00/networking/ifupdown.c 2005-06-09 16:10:17.000000000 +0200
+++ ./networking/ifupdown.c 2005-06-15 11:50:13.000000000 +0200
@@ -150,6 +150,7 @@
static char no_act = 0;
static char verbose = 0;
+#define environ environ_local
static char **environ = NULL;
#ifdef CONFIG_FEATURE_IFUPDOWN_IP
diff -urN ../tmp-orig/busybox-1.00/debian/control ./debian/control
--- ../tmp-orig/busybox-1.00/debian/control 2005-06-15 11:54:49.000000000 +0200
+++ ./debian/control 2005-06-15 11:54:43.000000000 +0200
@@ -69,7 +69,7 @@
Package: busybox-floppy-udeb
XC-Package-Type: udeb
-Architecture: i386
+Architecture: amd64 i386
Depends: ${shlibs:Depends}
Section: debian-installer
Priority: extra
Reply to: