An inline function from linux/ext2_fs.h does not compile without including linux/fs.h.
Please attach your config and the compile error that you get, thanks. -Eric
The error occured when compiling a user space program. Just include linux/ext2_fs.h whithout linux/fs.h and you get: /usr/include/linux/ext2_fs.h: In function 'ext2_mask_flags': /usr/include/linux/ext2_fs.h:182: error: 'FS_DIRSYNC_FL' undeclared (first use in this function) /usr/include/linux/ext2_fs.h:182: error: (Each undeclared identifier is reported only once /usr/include/linux/ext2_fs.h:182: error: for each function it appears in.) /usr/include/linux/ext2_fs.h:182: error: 'FS_TOPDIR_FL' undeclared (first use in this function) /usr/include/linux/ext2_fs.h:184: error: 'FS_NODUMP_FL' undeclared (first use in this function) /usr/include/linux/ext2_fs.h:184: error: 'FS_NOATIME_FL' undeclared (first use in this function)
ah, userspace. Thanks, that wasn't clear. commit 36695673b012096228ebdc1b39a6a5850daa474e Author: David Howells <dhowells@redhat.com> Date: Tue Aug 29 19:06:16 2006 +0100 [PATCH] BLOCK: Move common FS-specific ioctls to linux/fs.h [try #6] changed to use those FS_ flags; maybe one of the existing #includes used to pull in fs.h, not sure.
I sent a patch upstream for this.
(In reply to comment #2) > The error occured when compiling a user space program. Just include > linux/ext2_fs.h whithout linux/fs.h and you get: > > /usr/include/linux/ext2_fs.h: In function 'ext2_mask_flags': > /usr/include/linux/ext2_fs.h:182: error: 'FS_DIRSYNC_FL' undeclared (first > use > in this function) > /usr/include/linux/ext2_fs.h:182: error: (Each undeclared identifier is > reported only once > /usr/include/linux/ext2_fs.h:182: error: for each function it appears in.) > /usr/include/linux/ext2_fs.h:182: error: 'FS_TOPDIR_FL' undeclared (first use > in this function) > /usr/include/linux/ext2_fs.h:184: error: 'FS_NODUMP_FL' undeclared (first use > in this function) > /usr/include/linux/ext2_fs.h:184: error: 'FS_NOATIME_FL' undeclared (first > use > in this function) Wouldn't it be better to include <ext2fs/ext2_fs.h> from e2fsprogs-devel, instead of <linux/ext2_fs.h> from the kernel?
It probably is better but if the header is provided, shouldn't it work?
Resolved invalid? I understand this needed 20 months, but what??? This is what makes Linux such a great piece of software.
The kernel headers are not meant to be directly used by applications (which was dealt with in 2010 in Andreas comment) I'm just cleaning up old stuff