Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: convert: handle rename of inode_includes() from e2fsprog…
…s 1.47.1 There is a new release candidate for e2fsprogs https://github.com/tytso/e2fsprogs/releases/tag/v1.47.1-rc2 Linking btrfs-progs v6.8 against this version of e2fsprogs leads to the following compile error: convert/source-ext2.c: In function 'ext4_copy_inode_timespec_extra': convert/source-ext2.c:733:13: warning: implicit declaration of function 'inode_includes' [-Wimplicit-function-declaration] 733 | if (inode_includes(inode_size, i_ ## xtime ## _extra)) { \ | ^~~~~~~~~~~~~~ convert/source-ext2.c:769:9: note: in expansion of macro 'EXT4_COPY_XTIME' 769 | EXT4_COPY_XTIME(atime, dst, tv_sec, tv_nsec); | ^~~~~~~~~~~~~~~ convert/source-ext2.c:733:40: error: 'i_atime_extra' undeclared (first use in this function) 733 | if (inode_includes(inode_size, i_ ## xtime ## _extra)) { \ | ^~ convert/source-ext2.c:769:9: note: in expansion of macro 'EXT4_COPY_XTIME' 769 | EXT4_COPY_XTIME(atime, dst, tv_sec, tv_nsec); | ^~~~~~~~~~~~~~~ convert/source-ext2.c:733:40: note: each undeclared identifier is reported only once for each function it appears in 733 | if (inode_includes(inode_size, i_ ## xtime ## _extra)) { \ | ^~ convert/source-ext2.c:769:9: note: in expansion of macro 'EXT4_COPY_XTIME' 769 | EXT4_COPY_XTIME(atime, dst, tv_sec, tv_nsec); | ^~~~~~~~~~~~~~~ convert/source-ext2.c:733:40: error: 'i_mtime_extra' undeclared (first use in this function) 733 | if (inode_includes(inode_size, i_ ## xtime ## _extra)) { \ | ^~ convert/source-ext2.c:770:9: note: in expansion of macro 'EXT4_COPY_XTIME' 770 | EXT4_COPY_XTIME(mtime, dst, tv_sec, tv_nsec); | ^~~~~~~~~~~~~~~ convert/source-ext2.c:733:40: error: 'i_ctime_extra' undeclared (first use in this function) 733 | if (inode_includes(inode_size, i_ ## xtime ## _extra)) { \ | ^~ convert/source-ext2.c:771:9: note: in expansion of macro 'EXT4_COPY_XTIME' 771 | EXT4_COPY_XTIME(ctime, dst, tv_sec, tv_nsec); | ^~~~~~~~~~~~~~~ convert/source-ext2.c:774:40: error: 'i_crtime_extra' undeclared (first use in this function) 774 | if (inode_includes(inode_size, i_crtime_extra)) { | ^~~~~~~~~~~~~~ from tytso/e2fsprogs@ca8bc92 Fix inode_includes() macro to properly wrap "inode" parameter, and rename to ext2fs_inode_includes() to avoid potential name clashes. Use this to check inode field inclusion in debugfs instead of bare constants for inode field offsets. To fix that use the new prefixed macro and add backward compatibility that would still use inode_includes(). Issue: #785 Signed-off-by: David Sterba <[email protected]>
- Loading branch information