From ed712dbb567d319f51dde0585a7ebbcbd9aed354 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 21 Feb 2005 22:12:49 -0800 Subject: [PATCH] [PATCH] Re-order includes to fix userland breakage The following moves all includes (except and 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 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: Tom Rini Signed-off-by: Linus Torvalds --- include/linux/fs.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 84b3b114f943..07f41a111113 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -7,25 +7,7 @@ */ #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include - -struct iovec; -struct nameidata; -struct pipe_inode_info; -struct poll_table_struct; -struct kstatfs; -struct vm_area_struct; -struct vfsmount; /* * It's silly to have NR_OPEN bigger than NR_FILE, but you can change @@ -216,14 +198,33 @@ extern int dir_notify_enable; #ifdef __KERNEL__ +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include + +#include #include #include +struct iovec; +struct nameidata; +struct pipe_inode_info; +struct poll_table_struct; +struct kstatfs; +struct vm_area_struct; +struct vfsmount; + /* Used to be a macro which just called the function, now just a function */ extern void update_atime (struct inode *); -- 2.39.5