Whamcloud - gitweb
libext2fs: fix build errors on bigendian hosts
authorEryu Guan <guaneryu@gmail.com>
Thu, 27 Mar 2014 10:17:24 +0000 (18:17 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 8 Apr 2014 18:33:28 +0000 (14:33 -0400)
commit251edc3d3b6fd3b8c2d93dd247e21a03705e4a6b
tree03026c272b5c9efc312d742554be7c681758870d
parent28b966d7c667049f19a2947441ed29a95b415469
libext2fs: fix build errors on bigendian hosts

Fix the following build errors on bigendian hosts.

- ctx is a pointer, use '->' not '.'
- add missing argument to ext2fs_dirent_swab_in2

make[2]: Entering directory `/root/e2fsprogs/lib/ext2fs'
        CC inline_data.c
inline_data.c: In function ‘ext2fs_inline_data_dir_iterate’:
inline_data.c:221:5: error: request for member ‘errcode’ in something not a structure or union
  ctx.errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
     ^
inline_data.c:222:9: error: request for member ‘errcode’ in something not a structure or union
  if (ctx.errcode) {
         ^
inline_data.c: In function ‘ext2fs_inline_data_dir_expand’:
inline_data.c:364:2: error: too few arguments to function ‘ext2fs_dirent_swab_in2’
  retval = ext2fs_dirent_swab_in2(fs, buf, size);
  ^
In file included from inline_data.c:19:0:
ext2fs.h:1569:18: note: declared here
 extern errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char *buf, size_t size,
                  ^
make[2]: *** [inline_data.o] Error 1

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
lib/ext2fs/inline_data.c