lkml.org 
[lkml]   [2003]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] include/linux/sysctl.h needs linux/compiler.h
ismail (cartman) donmez wrote:

> On Saturday 31 May 2003 19:18, Kevin P. Fleming wrote:
>
>>Changes during 2.5.70 added _user tags to various bits in
>>include/linux/sysctl.h. __user is defined in linux/compiler.h, which is
>>included by linux/kernel.h but only if __KERNEL__ is defined. Compiliing
>>uClibc against 2.5.70 fails because __user__ is not defined.
>>
>>Adding patch below solves the problem (yes, I know, userspace is not
>>supposed to use kernel headers...)
>>
>>--- linux-2.5/include/linux/sysctl.h~ Sat May 31 08:52:49 2003
>>+++ linux-2.5/include/linux/sysctl.h Sat May 31 09:04:29 2003
>>@@ -27,6 +27,7 @@
>> #include <linux/kernel.h>
>> #include <linux/types.h>
>> #include <linux/list.h>
>>+#include <linux/compiler.h>
>>
>> struct file;
>
>
> linux/kernel.h includes <linux/compiler.h>.
>

See the beginning of my message... it only does so if _KERNEL_ is
defined. Since other header files also directly include compiler.h even
though they already include kernel.h, I didn't think this was an
unreasonable solution (i.e. they must have done it for the same reason,
since there are comments specifically about including compiler.h for
"__user").

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site