Package: busybox
Severity: normal
Tags: patch

When building 'busybox' on amd64 with gcc-4.0,
I get the following error:

gcc -Wall -Wshadow -Os -fomit-frame-pointer -D_GNU_SOURCE  -DBB_VER='"0.60.5"' 
-DBB_BT='"2005.02.09-21:18+0000"'  -I- -I. -I../../ -c ../../gzip.c -o gzip.o
cc1: note: obsolete option -I- used, please use -iquote instead
../../gzip.c:2177: warning: type qualifiers ignored on function return type
../../gzip.c:2177: error: conflicting types for 'build_bl_tree'
../../gzip.c:1651: error: previous declaration of 'build_bl_tree' was here
make[1]: *** [gzip.o] Error 1
make[1]: Leaving directory `/busybox-0.60.5/debian/busybox_builddir'
make: *** [debian/build-stamp-busybox] Error 2

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/busybox-0.60.5/gzip.c ./gzip.c
--- ../tmp-orig/busybox-0.60.5/gzip.c   2002-02-28 03:54:37.000000000 +0000
+++ ./gzip.c    2005-02-09 20:51:48.240258773 +0000
@@ -2173,7 +2173,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-0.60.5/mkfs_minix.c ./mkfs_minix.c
--- ../tmp-orig/busybox-0.60.5/mkfs_minix.c     2001-08-29 19:02:26.000000000 
+0000
+++ ./mkfs_minix.c      2005-02-09 21:09:45.602797493 +0000
@@ -541,9 +541,8 @@
        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;
 /* some magic nrs: 1 inode / 3 blocks */
        if (req_nr_inodes == 0)
                inodes = BLOCKS / 3;
@@ -551,23 +550,27 @@
                inodes = req_nr_inodes;
        /* Round up inode count to fill block size */
 #ifdef BB_FEATURE_MINIX2
-       if (version2)
+       if (version2) {
+               Super.s_zones = BLOCKS;
                inodes = ((inodes + MINIX2_INODES_PER_BLOCK - 1) &
                                  ~(MINIX2_INODES_PER_BLOCK - 1));
-       else
+       } else
 #endif
+       {
+               Super.s_nzones = BLOCKS;
                inodes = ((inodes + MINIX_INODES_PER_BLOCK - 1) &
                                  ~(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++;
@@ -581,7 +584,7 @@
        if (i >= 999) {
                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);


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to