[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#288981: busybox-cvs: FTBFS (amd64/gcc-4.0): conflicting types for 'build_bl_tree'



Package: busybox-cvs
Severity: normal
Tags: patch

gcc -I./include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -Wstrict-prototypes -Wshadow -Os -fomit-frame-pointer -DNDEBUG     -c -o archival/gzip.o archival/gzip.c
archival/gzip.c:2166: warning: type qualifiers ignored on function return type
archival/gzip.c:2166: error: conflicting types for 'build_bl_tree'
archival/gzip.c:1643: error: previous declaration of 'build_bl_tree' was here
make[1]: *** [archival/gzip.o] Error 1
make[1]: Leaving directory `/busybox-cvs-20040623'
make: *** [build-arch-deb-stamp] Error 2

With the attached patch 'busybox-cvs' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/busybox-cvs-20040623/archival/gzip.c ./archival/gzip.c
--- ../tmp-orig/busybox-cvs-20040623/archival/gzip.c	2004-04-15 22:52:48.000000000 +0200
+++ ./archival/gzip.c	2005-01-06 14:37:51.000000000 +0100
@@ -1640,7 +1640,7 @@
 static void build_tree(tree_desc * desc);
 static void scan_tree(ct_data * tree, int max_code);
 static void send_tree(ct_data * tree, int max_code);
-static int build_bl_tree(void);
+static const int build_bl_tree(void);
 static void send_all_trees(int lcodes, int dcodes, int blcodes);
 static void compress_block(ct_data * ltree, ct_data * dtree);
 static void set_file_type(void);
diff -urN ../tmp-orig/busybox-cvs-20040623/modutils/obj/depmod.c ./modutils/obj/depmod.c
--- ../tmp-orig/busybox-cvs-20040623/modutils/obj/depmod.c	2005-01-06 17:21:18.225188952 +0100
+++ ./modutils/obj/depmod.c	2005-01-06 16:37:07.450168008 +0100
@@ -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-cvs-20040623/modutils/obj/insmod.c ./modutils/obj/insmod.c
--- ../tmp-orig/busybox-cvs-20040623/modutils/obj/insmod.c	2005-01-06 17:21:18.234187584 +0100
+++ ./modutils/obj/insmod.c	2005-01-06 17:00:52.415540344 +0100
@@ -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-cvs-20040623/modutils/obj/modstat.c ./modutils/obj/modstat.c
--- ../tmp-orig/busybox-cvs-20040623/modutils/obj/modstat.c	2005-01-06 17:21:18.226188800 +0100
+++ ./modutils/obj/modstat.c	2005-01-06 17:07:37.572947056 +0100
@@ -199,6 +199,7 @@
 				s->name += (unsigned long) syms;
 		}
 		next:
+		continue;
 	}
 
 	if (type & K_SYMBOLS) { /* Want info about symbols */
diff -urN ../tmp-orig/busybox-cvs-20040623/modutils/obj/obj_kallsyms.c ./modutils/obj/obj_kallsyms.c
--- ../tmp-orig/busybox-cvs-20040623/modutils/obj/obj_kallsyms.c	2005-01-06 17:21:18.217190168 +0100
+++ ./modutils/obj/obj_kallsyms.c	2005-01-06 17:12:08.635739248 +0100
@@ -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-cvs-20040623/networking/ifupdown.c ./networking/ifupdown.c
--- ../tmp-orig/busybox-cvs-20040623/networking/ifupdown.c	2004-05-07 15:47:44.000000000 +0200
+++ ./networking/ifupdown.c	2005-01-06 15:32:58.886238656 +0100
@@ -148,7 +148,7 @@
 
 static char no_act = 0;
 static char verbose = 0;
-static char **environ = NULL;
+static char **environm = NULL;
 
 #ifdef CONFIG_FEATURE_IFUPDOWN_IP
 
@@ -545,21 +545,6 @@
 	return(0);
 }
 
-static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
-{
-	int result = 0;
-	if (execable("/sbin/udhcpc")) {
-		execute("kill -9 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
-	} else if (execable("/sbin/pump")) {
-		result = execute("pump -i %iface% -k", ifd, exec);
-	} else if (execable("/sbin/dhclient")) {
-		execute("kill -9 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
-	} else if (execable("/sbin/dhcpcd")) {
-		result = execute("dhcpcd -k %iface%", ifd, exec);
-	}
-	return (result || bootp_down(ifd, exec));
-}
-
 static int bootp_up(struct interface_defn_t *ifd, execfn *exec)
 {
 	return( execute("bootpc [[--bootfile %bootfile%]] --dev %iface% "
@@ -576,6 +561,21 @@
 #endif
 }
 
+static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
+{
+	int result = 0;
+	if (execable("/sbin/udhcpc")) {
+		execute("kill -9 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
+	} else if (execable("/sbin/pump")) {
+		result = execute("pump -i %iface% -k", ifd, exec);
+	} else if (execable("/sbin/dhclient")) {
+		execute("kill -9 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
+	} else if (execable("/sbin/dhcpcd")) {
+		result = execute("dhcpcd -k %iface%", ifd, exec);
+	}
+	return (result || bootp_down(ifd, exec));
+}
+
 static int ppp_up(struct interface_defn_t *ifd, execfn *exec)
 {
 	return( execute("pon [[%provider%]]", ifd, exec));
@@ -960,16 +960,16 @@
 	const int n_env_entries = iface->n_options + 5;
 	char **ppch;
 
-	if (environ != NULL) {
-		for (ppch = environ; *ppch; ppch++) {
+	if (environm != NULL) {
+		for (ppch = environm; *ppch; ppch++) {
 			free(*ppch);
 			*ppch = NULL;
 		}
-		free(environ);
-		environ = NULL;
+		free(environm);
+		environm = NULL;
 	}
-	environ = xmalloc(sizeof(char *) * (n_env_entries + 1 /* for final NULL */ ));
-	environend = environ;
+	environm = xmalloc(sizeof(char *) * (n_env_entries + 1 /* for final NULL */ ));
+	environend = environm;
 	*environend = NULL;
 
 	for (i = 0; i < iface->n_options; i++) {
@@ -1009,7 +1009,7 @@
 			case -1:		/* failure */
 				return 0;
 			case 0:		/* child */
-				execle(DEFAULT_SHELL, DEFAULT_SHELL, "-c", str, NULL, environ);
+				execle(DEFAULT_SHELL, DEFAULT_SHELL, "-c", str, NULL, environm);
 				exit(127);
 		}
 		waitpid(child, &status, 0);
diff -urN ../tmp-orig/busybox-cvs-20040623/util-linux/mkfs_minix.c ./util-linux/mkfs_minix.c
--- ../tmp-orig/busybox-cvs-20040623/util-linux/mkfs_minix.c	2004-04-15 22:52:48.000000000 +0200
+++ ./util-linux/mkfs_minix.c	2005-01-06 15:41:48.913662240 +0100
@@ -542,9 +542,14 @@
 	memset(super_block_buffer, 0, BLOCK_SIZE);
 	memset(boot_block_buffer, 0, 512);
 	MAGIC = magic;
-	ZONESIZE = 0;
-	MAXSIZE = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024;
-	ZONES = BLOCKS;
+	Super.s_log_zone_size = 0;
+	Super.s_max_size = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024;
+#ifdef CONFIG_FEATURE_MINIX2
+	if (version2)
+		Super.s_nzones = BLOCKS;
+	else
+#endif
+	Super.s_nzones = BLOCKS;
 /* some magic nrs: 1 inode / 3 blocks */
 	if (req_nr_inodes == 0)
 		inodes = BLOCKS / 3;
@@ -561,14 +566,14 @@
 				  ~(MINIX_INODES_PER_BLOCK - 1));
 	if (inodes > 65535)
 		inodes = 65535;
-	INODES = inodes;
-	IMAPS = UPPER(INODES + 1, BITS_PER_BLOCK);
-	ZMAPS = 0;
+	Super.s_ninodes = inodes;
+	Super.s_imap_blocks = UPPER(INODES + 1, BITS_PER_BLOCK);
+	Super.s_zmap_blocks = 0;
 	i = 0;
 	while (ZMAPS !=
 		   UPPER(BLOCKS - (2 + IMAPS + ZMAPS + INODE_BLOCKS) + 1,
 				 BITS_PER_BLOCK) && i < 1000) {
-		ZMAPS =
+		Super.s_zmap_blocks =
 			UPPER(BLOCKS - (2 + IMAPS + ZMAPS + INODE_BLOCKS) + 1,
 				  BITS_PER_BLOCK);
 		i++;
@@ -582,7 +587,7 @@
 	if (i >= 999) {
 		bb_error_msg_and_die("unable to allocate buffers for maps");
 	}
-	FIRSTZONE = NORM_FIRSTZONE;
+	Super.s_firstdatazone = NORM_FIRSTZONE;
 	inode_map = xmalloc(IMAPS * BLOCK_SIZE);
 	zone_map = xmalloc(ZMAPS * BLOCK_SIZE);
 	memset(inode_map, 0xff, IMAPS * BLOCK_SIZE);



Reply to: