Skip to contentSkip to conversation

x86: Fix non-kernel use of include/linux/types.h

PATCH In review Rusty Russell 2 participants 3 messages Apr 24, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Fix non-kernel use of include/linux/types.h

In file included from ../../include/linux/if_tun.h:21,

                 from lguest.c:30:

../../include/linux/types.h:203: error: expected specifier-qualifier-list before ‘__kernel_daddr_t’

This reversion was created by e40c0fe6b0b5dd16aec3c0dad311d36b19d78fd9 'x86: cleanup duplicate includes' which removed the !__KERNEL__ case from asm-x86/posix_types.h.

CC Joe Perches <[email protected]>
---
 include/asm-x86/posix_types.h |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
include/asm-x86/posix_types.h +4 -6
diff -r c06e2499a606 include/asm-x86/posix_types.h
@@ -1,7 +1,5 @@
-#ifdef __KERNEL__
-# if defined(CONFIG_X86_32) || defined(__i386__)
-#  include "posix_types_32.h"
-# else
-#  include "posix_types_64.h"
-# endif
+#if defined(CONFIG_X86_32) || defined(__i386__)
+# include "posix_types_32.h"
+#else
+# include "posix_types_64.h"
 #endif
#1 lore raw
Quoted 7 lines · Rusty Russell

In file included from ../../include/linux/if_tun.h:21,

                 from lguest.c:30:

../../include/linux/types.h:203: error: expected specifier-qualifier-list before ‘__kernel_daddr_t’

This reversion was created by e40c0fe6b0b5dd16aec3c0dad311d36b19d78fd9 'x86: cleanup duplicate includes' which removed the !__KERNEL__ case from asm-x86/posix_types.h.

I'd actually prefer my patch [1] that:
- reverts to the 2.6.24 status quo since we shouldn't leak CONFIG_* to userspace at all and
- also fixes the same regression in unistd.h

Quoted 10 lines
CC Joe Perches <[email protected]>
---
 include/asm-x86/posix_types.h |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff -r c06e2499a606 include/asm-x86/posix_types.h

include/asm-x86/posix_types.h +0 -1
@@ -1,7 +1,5 @@
-#ifdef __KERNEL__

include/asm-x86/posix_types.h line 5

Quoted 10 lines
include/asm-x86/posix_types.h +4 -5
-# if defined(CONFIG_X86_32) || defined(__i386__)
-#  include "posix_types_32.h"
-# else
-#  include "posix_types_64.h"
-# endif
+#if defined(CONFIG_X86_32) || defined(__i386__)
+# include "posix_types_32.h"
+#else
+# include "posix_types_64.h"
 #endif

cu
Adrian

[1] http://lkml.org/lkml/2008/4/20/181

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw
Quoted 6 lines · On Friday 25 April 2008 02:01:01 Adrian Bunk wrote:
Quoted 5 lines · Rusty Russell

In file included from ../../include/linux/if_tun.h:21,

                 from lguest.c:30:

../../include/linux/types.h:203: error: expected specifier-qualifier-list before ‘__kernel_daddr_t’

Quoted 8 lines
Quoted 3 lines

This reversion was created by e40c0fe6b0b5dd16aec3c0dad311d36b19d78fd9 'x86: cleanup duplicate includes' which removed the !__KERNEL__ case from asm-x86/posix_types.h.

I'd actually prefer my patch [1] that:
- reverts to the 2.6.24 status quo since we shouldn't leak CONFIG_* to userspace at all and
- also fixes the same regression in unistd.h

Yep, prefer your patch too.

Cheers,
Rusty.