linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TRIVIAL] fix include/linux/sysctl.h for userland
@ 2003-07-19 17:52 Bernardo Innocenti
  2003-07-19 17:59 ` Christoph Hellwig
  2003-07-19 18:01 ` Valdis.Kletnieks
  0 siblings, 2 replies; 4+ messages in thread
From: Bernardo Innocenti @ 2003-07-19 17:52 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel


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.

--- linux-2.6.0-test1.orig/include/linux/sysctl.h	2003-07-14 05:34:40.000000000 +0200
+++ linux-2.6.0-test1/include/linux/sysctl.h	2003-07-19 19:20:29.000000000 +0200
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/list.h>
+#include <linux/compiler.h>
 
 struct file;
 

-- 
  // 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TRIVIAL] fix include/linux/sysctl.h for userland
  2003-07-19 17:52 [TRIVIAL] fix include/linux/sysctl.h for userland Bernardo Innocenti
@ 2003-07-19 17:59 ` Christoph Hellwig
  2003-07-19 18:01 ` Valdis.Kletnieks
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2003-07-19 17:59 UTC (permalink / raw)
  To: Bernardo Innocenti; +Cc: torvalds, linux-kernel

On Sat, Jul 19, 2003 at 07:52:35PM +0200, Bernardo Innocenti wrote:
> 
> Include linux/compiler.h in include/linux/sysctl.h. Needed to get __user
> defined 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TRIVIAL] fix include/linux/sysctl.h for userland
  2003-07-19 17:52 [TRIVIAL] fix include/linux/sysctl.h for userland Bernardo Innocenti
  2003-07-19 17:59 ` Christoph Hellwig
@ 2003-07-19 18:01 ` Valdis.Kletnieks
  2003-07-19 18:40   ` Bernardo Innocenti
  1 sibling, 1 reply; 4+ messages in thread
From: Valdis.Kletnieks @ 2003-07-19 18:01 UTC (permalink / raw)
  To: Bernardo Innocenti; +Cc: torvalds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

On Sat, 19 Jul 2003 19:52:35 +0200, Bernardo Innocenti said:
> 
> Include linux/compiler.h in include/linux/sysctl.h. Needed to get __user
> defined 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?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TRIVIAL] fix include/linux/sysctl.h for userland
  2003-07-19 18:01 ` Valdis.Kletnieks
@ 2003-07-19 18:40   ` Bernardo Innocenti
  0 siblings, 0 replies; 4+ messages in thread
From: Bernardo Innocenti @ 2003-07-19 18:40 UTC (permalink / raw)
  To: Valdis.Kletnieks, Christoph Hellwig; +Cc: torvalds, linux-kernel

On Sat, 19 Jul 2003 19:52:35 +0200, Bernardo Innocenti said:
> > Include linux/compiler.h in include/linux/sysctl.h. Needed to get __user
> > defined when C library uses this header (ie: no __KERNEL__).

On Saturday 19 July 2003 20:01, Valdis.Kletnieks@vt.edu wrote:
> Umm... shouldn't this be in the glibc-kernheaders version of sysctl.h
> that ends up in /usr/include rather than the kernel version?

On Saturday 19 July 2003 19:59, Christoph Hellwig wrote:
> 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.

-- 
  // 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-19 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-19 17:52 [TRIVIAL] fix include/linux/sysctl.h for userland Bernardo Innocenti
2003-07-19 17:59 ` Christoph Hellwig
2003-07-19 18:01 ` Valdis.Kletnieks
2003-07-19 18:40   ` Bernardo Innocenti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).