Source: e2fsprogs
Version: 1.43.8-1
Severity: serious
Tags: upstream patch
Hi,
The latest upload of e2fsprogs FTBFS on all big-endian architectures due
to two problems in swapfs.c:
> ../../../../lib/ext2fs/swapfs.c: In function 'ext2fs_swap_super':
> ../../../../lib/ext2fs/swapfs.c:132:2: warning: implicit declaration of
> function 'EXT2FS_BUILD_BUG_ON'; did you mean 'EXT2FS_NUM_B2C'?
> [-Wimplicit-function-declaration]
> EXT2FS_BUILD_BUG_ON(sizeof(sb->s_reserved) != 98 * sizeof(__le32));
> ^~~~~~~~~~~~~~~~~~~
> EXT2FS_NUM_B2C
> ../../../../lib/ext2fs/swapfs.c: In function 'ext2fs_swap_inode_full':
> ../../../../lib/ext2fs/swapfs.c:361:29: error: 'ext2_inode_large' undeclared
> (first use in this function)
> EXT2FS_BUILD_BUG_ON(sizeof(ext2_inode_large) != 160);
> ^~~~~~~~~~~~~~~~
> ../../../../lib/ext2fs/swapfs.c:361:29: note: each undeclared identifier is
> reported only once for each function it appears in
> Makefile:657: recipe for target 'swapfs.o' failed
Please apply the attached patch to include ext2fsP.h (for
EXT2FS_BUILD_BUG_ON) and add the missing "struct" keyword before
ext2_inode_large, which has been tested on sparc64.
Regards,
James
--- a/lib/ext2fs/swapfs.c
+++ b/lib/ext2fs/swapfs.c
@@ -19,6 +19,7 @@
#include "ext2_fs.h"
#include "ext2fs.h"
+#include "ext2fsP.h"
#include <ext2fs/ext2_ext_attr.h>
#ifdef WORDS_BIGENDIAN
@@ -358,7 +359,7 @@ void ext2fs_swap_inode_full(ext2_filsys
if (inode_includes(inode_size, i_projid))
t->i_projid = ext2fs_swab16(f->i_projid);
/* catch new static fields added after i_projid */
- EXT2FS_BUILD_BUG_ON(sizeof(ext2_inode_large) != 160);
+ EXT2FS_BUILD_BUG_ON(sizeof(struct ext2_inode_large) != 160);
i = sizeof(struct ext2_inode) + extra_isize + sizeof(__u32);
if (bufsize < (int) i)