Description of problem: | $ cat /tmp/foo.c | #include <ext2fs/ext2fs.h> | | $ gcc -c /tmp/foo.c | $ g++ -c /tmp/foo.c | In file included from /tmp/foo.c:1: | /usr/include/ext2fs/ext2fs.h:980: error: syntax error before `__attribute__' | /usr/include/ext2fs/ext2fs.h: In function `errcode_t ext2fs_resize_mem(...)': | /usr/include/ext2fs/ext2fs.h:980: error: declaration of C function `errcode_t | ext2fs_resize_mem(...)' conflicts with | /usr/include/ext2fs/ext2fs.h:918: error: previous declaration `errcode_t | ext2fs_resize_mem(long unsigned int, long unsigned int, void*)' here | /usr/include/ext2fs/ext2fs.h: In function `errcode_t ext2fs_resize_mem(...)': | /usr/include/ext2fs/ext2fs.h:984: error: `ptr' undeclared (first use this This is because of the line | _INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size EXT2FS_ATTR((unused)), Moving the EXT2FS_ATTR _before_ 'old_size' makes it work like a charm. Version-Release number of selected component (if applicable): e2fsprogs-devel-1.35-3 gcc-c++-3.3.2-3 How reproducible: 100% Additional info: I am reporting it here, since 1.35 is an unofficial version and I can not check if it is fixed in CVS/BK already.
Since people are asking what I mean with the moving of EXT2FS_ATTR, here a patch-like notation: - _INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size EXT2FS_ATTR((unused)), + _INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size, Btw, problem still exists in e2fsprogs-1.35-4
Fixed in rawhide in rpm e2fsprogs-1.35-5.1 or newer.