fix include/linux/sysctl.h for userland
Include linux/compiler.h in include/linux/sysctl.h. Needed to get __user defined when C library uses this header (ie: no __KERNEL__).
Please apply.
include/linux/sysctl.h +1 -0
@@ -21,6 +21,7 @@#include <linux/kernel.h> #include <linux/types.h> #include <linux/list.h> +#include <linux/compiler.h> struct file ;
Signature · 4 lines
// Bernardo Innocenti - Develer S.r.l., R&D dept. \X/ http://www.develer.com/ Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html
Quoted 3 lines · Bernardo Innocenti
Include
linux/compiler.hininclude/linux/sysctl.h. Needed to get__userdefined when C library uses this header (ie: no__KERNEL__).
It shouldn't be included from userspace, and glibc needs to be fixed not to do so.
Quoted 3 lines · Bernardo Innocenti
Include
linux/compiler.hininclude/linux/sysctl.h. Needed to get__userdefined when C library uses this header (ie: no__KERNEL__).
Umm... shouldn't this be in the glibc-kernheaders version of sysctl.h that ends up in /usr/include rather than the kernel version?
Quoted 2 lines · Bernardo Innocenti
Quoted 2 lines
Include
linux/compiler.hininclude/linux/sysctl.h. Needed to get__userdefined when C library uses this header (ie: no__KERNEL__).
Quoted 2 lines · On Saturday 19 July 2003 20:01, [email protected] wrote:
Umm... shouldn't this be in the glibc-kernheaders version of
sysctl.hthat ends up in/usr/includerather than the kernel version?
Quoted 2 lines · Christoph Hellwig
It shouldn't be included from userspace, and glibc needs to be fixed not to do so.
Two reasons:
- I'm using uClibc, not glibc. uClibc doesn't have a fixed copy of the kernel headers. Everything builds fine with real kernel headers from both 2.4.x and 2.6.x, except for this small glitch.
- If we fix it now, the glibc guys will have one less patch to apply when they update their copy.
The glibc-kernelheaders package exists only because the glibc people cannot afford to work-around every single quirk in any version of the kernel.
And if you often build system utilities you'll find out there is quite a lot of userland code out there with legitimate reasons for including kernel headers. Some examples: strace, nfsutils, psutils, quota.
Signature · 4 lines
// Bernardo Innocenti - Develer S.r.l., R&D dept. \X/ http://www.develer.com/ Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html