From 6abbc7bac8ea5e3210935867b32c65d402dcb7fb Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Fri, 19 Mar 2010 02:51:56 +0100 Subject: [PATCH] resource: move kernel function inside __KERNEL__ commit 96d07d211739fd2450ac54e81d00fa40fcd4b1bd upstream From: Jiri Slaby resource: move kernel function inside __KERNEL__ It is an internal function. Move it inside __KERNEL__ ifdef, along with task_struct declaration. Then we get: #--- /usr/include/linux/resource.h 2009-09-14 15:09:29.000000000 +0200 #+++ usr/include/linux/resource.h 2010-01-04 11:30:54.000000000 +0100 #@@ -3,8 +3,6 @@ # ##include # #-struct task_struct; #- #/* #* Resource control/accounting header file for linux #*/ #@@ -70,6 +68,5 @@ #*/ ##include # #-int getrusage(struct task_struct *p, int who, struct rusage *ru); # ##endif # #*********** include/linux/Kbuild is untouched, since unifdef is run even on headers-y nowadays. backport to 2.6.32 by maximilian attems Patch commented out by gregkh due to quilt complaining. Signed-off-by: Jiri Slaby Cc: maximilian attems Signed-off-by: Greg Kroah-Hartman --- include/linux/resource.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/resource.h b/include/linux/resource.h index 40fc7e626082..f1e914eefeab 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h @@ -3,8 +3,6 @@ #include -struct task_struct; - /* * Resource control/accounting header file for linux */ @@ -70,6 +68,12 @@ struct rlimit { */ #include +#ifdef __KERNEL__ + +struct task_struct; + int getrusage(struct task_struct *p, int who, struct rusage __user *ru); +#endif /* __KERNEL__ */ + #endif -- 2.34.1