Package: xfsprogs Severity: normal Tags: patch When building 'xfsprogs' on amd64 with the latest version of gcc-4.0, I get the following error:
In file included from agf.c:34: agf.h:35: error: array type has incomplete element type agf.h:36: error: array type has incomplete element type make[2]: *** [agf.o] Error 1 make[1]: *** [default] Error 2 make[1]: Leaving directory `/xfsprogs-2.6.20' make: *** [built] Error 2 With the attached patch 'xfsprogs' can be compiled on amd64 using the latest version of gcc-4.0. This patch includes the patch from #297876. Regards Andreas Jochens diff -urN ../tmp-orig/xfsprogs-2.6.20/db/agf.h ./db/agf.h --- ../tmp-orig/xfsprogs-2.6.20/db/agf.h 2003-04-29 08:08:41.000000000 +0200 +++ ./db/agf.h 2005-03-20 14:09:40.230846096 +0100 @@ -30,10 +30,5 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -struct field; - -extern const struct field agf_flds[]; -extern const struct field agf_hfld[]; - extern void agf_init(void); extern int agf_size(void *obj, int startoff, int idx); diff -urN ../tmp-orig/xfsprogs-2.6.20/db/agfl.h ./db/agfl.h --- ../tmp-orig/xfsprogs-2.6.20/db/agfl.h 2003-04-29 08:08:41.000000000 +0200 +++ ./db/agfl.h 2005-03-20 14:09:47.709409934 +0100 @@ -30,10 +30,5 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -struct field; - -extern const struct field agfl_flds[]; -extern const struct field agfl_hfld[]; - extern void agfl_init(void); extern int agfl_size(void *obj, int startoff, int idx); diff -urN ../tmp-orig/xfsprogs-2.6.20/db/agi.h ./db/agi.h --- ../tmp-orig/xfsprogs-2.6.20/db/agi.h 2003-04-29 08:08:41.000000000 +0200 +++ ./db/agi.h 2005-03-20 14:10:22.978636714 +0100 @@ -30,10 +30,5 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -struct field; - -extern const struct field agi_flds[]; -extern const struct field agi_hfld[]; - extern void agi_init(void); extern int agi_size(void *obj, int startoff, int idx); diff -urN ../tmp-orig/xfsprogs-2.6.20/db/dquot.h ./db/dquot.h --- ../tmp-orig/xfsprogs-2.6.20/db/dquot.h 2003-04-29 08:08:43.000000000 +0200 +++ ./db/dquot.h 2005-03-20 14:11:14.590724306 +0100 @@ -30,10 +30,4 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -struct field; - -extern const struct field disk_dquot_flds[]; -extern const struct field dqblk_flds[]; -extern const struct field dqblk_hfld[]; - extern void dquot_init(void); diff -urN ../tmp-orig/xfsprogs-2.6.20/db/field.c ./db/field.c --- ../tmp-orig/xfsprogs-2.6.20/db/field.c 2003-05-01 08:00:50.000000000 +0200 +++ ./db/field.c 2005-03-20 14:10:32.658777643 +0100 @@ -54,6 +54,10 @@ #include "dir2.h" #include "dir2sf.h" +extern const struct field agf_flds[], agfl_flds[], agi_flds[], inode_a_flds[], + inode_core_flds[], inode_u_flds[], disk_dquot_flds[], dqblk_flds[], + inode_flds[], sb_flds[], timestamp_flds[]; + const ftattr_t ftattrtab[] = { { FLDT_AEXTNUM, "aextnum", fp_num, "%d", SI(bitsz(xfs_aextnum_t)), FTARG_SIGNED, NULL, NULL }, diff -urN ../tmp-orig/xfsprogs-2.6.20/db/inode.h ./db/inode.h --- ../tmp-orig/xfsprogs-2.6.20/db/inode.h 2003-04-29 08:08:45.000000000 +0200 +++ ./db/inode.h 2005-03-20 14:10:06.364827331 +0100 @@ -30,13 +30,6 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -extern const struct field inode_a_flds[]; -extern const struct field inode_core_flds[]; -extern const struct field inode_flds[]; -extern const struct field inode_hfld[]; -extern const struct field inode_u_flds[]; -extern const struct field timestamp_flds[]; - extern int fp_dinode_fmt(void *obj, int bit, int count, char *fmtstr, int size, int arg, int base, int array); extern int inode_a_size(void *obj, int startoff, int idx); diff -urN ../tmp-orig/xfsprogs-2.6.20/db/sb.h ./db/sb.h --- ../tmp-orig/xfsprogs-2.6.20/db/sb.h 2004-06-18 10:08:40.000000000 +0200 +++ ./db/sb.h 2005-03-20 14:11:29.300898990 +0100 @@ -30,11 +30,6 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -struct field; - -extern const struct field sb_flds[]; -extern const struct field sb_hfld[]; - extern void sb_init(void); extern int sb_logcheck(void); extern int sb_size(void *obj, int startoff, int idx); diff -urN ../tmp-orig/xfsprogs-2.6.20/db/type.c ./db/type.c --- ../tmp-orig/xfsprogs-2.6.20/db/type.c 2003-05-01 08:00:51.000000000 +0200 +++ ./db/type.c 2005-03-20 14:10:41.960991127 +0100 @@ -64,6 +64,9 @@ static const typ_t *findtyp(char *name); static int type_f(int argc, char **argv); +extern const struct field agf_hfld[], agfl_hfld[], agi_hfld[], dqblk_hfld[], + inode_hfld[], sb_hfld[]; + const typ_t *cur_typ; static const cmdinfo_t type_cmd = diff -urN ../tmp-orig/xfsprogs-2.6.20/debian/control ./debian/control --- ../tmp-orig/xfsprogs-2.6.20/debian/control 2004-05-19 07:00:19.000000000 +0200 +++ ./debian/control 2005-03-20 13:43:31.476264441 +0100 @@ -2,7 +2,7 @@ Section: admin Priority: optional Maintainer: Nathan Scott <[EMAIL PROTECTED]> -Build-Depends: uuid-dev, autoconf, debhelper, gettext, libtool, libreadline4-dev +Build-Depends: uuid-dev, autoconf, debhelper, gettext, libtool, libreadline5-dev Standards-Version: 3.5.9 Package: xfsprogs diff -urN ../tmp-orig/xfsprogs-2.6.20/debian/control.rej ./debian/control.rej --- ../tmp-orig/xfsprogs-2.6.20/debian/control.rej 1970-01-01 01:00:00.000000000 +0100 +++ ./debian/control.rej 2005-03-20 14:08:44.206604314 +0100 @@ -0,0 +1,17 @@ +*************** +*** 2,8 **** + Section: admin + Priority: optional + Maintainer: Nathan Scott <[EMAIL PROTECTED]> +- Build-Depends: uuid-dev, autoconf, debhelper, gettext, libtool, libreadline4-dev + Standards-Version: 3.5.9 + + Package: xfsprogs +--- 2,8 ---- + Section: admin + Priority: optional + Maintainer: Nathan Scott <[EMAIL PROTECTED]> ++ Build-Depends: uuid-dev, autoconf, debhelper, gettext, libtool, libreadline5-dev + Standards-Version: 3.5.9 + + Package: xfsprogs diff -urN ../tmp-orig/xfsprogs-2.6.20/mkfile/xfs_mkfile.c ./mkfile/xfs_mkfile.c --- ../tmp-orig/xfsprogs-2.6.20/mkfile/xfs_mkfile.c 2003-05-01 08:00:53.000000000 +0200 +++ ./mkfile/xfs_mkfile.c 2005-03-20 14:08:41.080204643 +0100 @@ -39,13 +39,13 @@ #define MAXBUFFERSIZE (256 * 1024) -static char *progname; +static char *progname_local; static void usage(void) { fprintf(stderr, _("%s: [-npv] <size> <name1> [<name2>] ...\n"), - progname); + progname_local); exit(2); } @@ -63,7 +63,7 @@ if (!platform_test_xfs_fd(fd)) { fprintf(stderr, _("%s: " "file [\"%s\"] is not on an XFS filesystem\n"), - progname, name); + progname_local, name); return -1; } return fd; @@ -93,7 +93,7 @@ int oflags; xfs_flock64_t flck; - progname = basename(argv[0]); + progname_local = basename(argv[0]); setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); @@ -110,7 +110,7 @@ verbose++; break; case 'V': - printf(_("%s version %s\n"), progname, VERSION); + printf(_("%s version %s\n"), progname_local, VERSION); exit(0); default: errflg++; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]