• Tom Rini's avatar
    [PATCH] Re-order <linux/fs.h> includes to fix userland breakage · ed712dbb
    Tom Rini authored
    The following moves all includes <linux/fs.h> (except <linux/ioctl.h>
    and <linux/config.h> down to below the existing __KERNEL__ test.  None
    of these includes are needed by the user-visible portions of the header,
    and in some cases can cause userland apps to break.
    
    For example, LTP and sash with an empty <linux/autoconf.h> will fail
    thusly:
    
      cc -Wall  -I../../include -g -Wall -I../../../../include -Wall    setrlimit02.c -L../../../../lib -lltp  -o setrlimit02
      In file included from /usr/include/asm/atomic.h:6,
                       from /usr/include/linux/fs.h:20,
                       from setrlimit02.c:46:
      /usr/include/asm/processor.h:68: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
      /usr/include/asm/processor.h:68: error: requested alignment is not a constant
    
    Build/run tested with a glibc rebuild as well.
    Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    ed712dbb
fs.h 59.8 KB