OpenCloudOS-Kernel/arch
David Howells c0522b6cc1 UAPI: x86: Fix insn_sanity build failure after UAPI split
Fix a build failure in the x86 insn_sanity program after the UAPI split.  The
problem is that insn_sanity.c #includes arch/x86/lib/insn.c - which uses the
kernel string header.  This leads to conflicts for various definitions against
the /usr/include/ headers.

linux/string.h can be replaced with the normal userspace string.h if __KERNEL__
is not specified.

  HOSTCC  arch/x86/tools/insn_sanity
In file included from /data/fs/linux-2.6-hdr/include/linux/string.h:6:0,
                 from /data/fs/linux-2.6-hdr/arch/x86/lib/insn.c:21,
                 from arch/x86/tools/insn_sanity.c:36:
/data/fs/linux-2.6-hdr/include/linux/types.h:14:26: error: conflicting types for 'fd_set'
/usr/include/sys/select.h:76:5: note: previous declaration of 'fd_set' was here
/data/fs/linux-2.6-hdr/include/linux/types.h:15:25: error: conflicting types for 'dev_t'
/usr/include/sys/types.h:61:17: note: previous declaration of 'dev_t' was here
/data/fs/linux-2.6-hdr/include/linux/types.h:25:26: error: conflicting types for 'timer_t'
/usr/include/time.h:104:19: note: previous declaration of 'timer_t' was here
/data/fs/linux-2.6-hdr/include/linux/types.h:45:26: error: conflicting types for 'loff_t'
/usr/include/sys/types.h:45:18: note: previous declaration of 'loff_t' was here
/data/fs/linux-2.6-hdr/include/linux/types.h:112:17: error: conflicting types for 'u_int64_t'
/usr/include/sys/types.h:204:1: note: previous declaration of 'u_int64_t' was here
/data/fs/linux-2.6-hdr/include/linux/types.h:113:17: error: conflicting types for 'int64_t'
/usr/include/sys/types.h:198:1: note: previous declaration of 'int64_t' was here
/data/fs/linux-2.6-hdr/include/linux/types.h:134:23: error: conflicting types for 'blkcnt_t'
/usr/include/sys/types.h:236:20: note: previous declaration of 'blkcnt_t' was here
In file included from /data/fs/linux-2.6-hdr/arch/x86/lib/insn.c:21:0,
                 from arch/x86/tools/insn_sanity.c:36:
/data/fs/linux-2.6-hdr/include/linux/string.h:38:12: error: expected identifier or '(' before '__extension__'
/data/fs/linux-2.6-hdr/include/linux/string.h:38:12: error: expected identifier or '(' before ')' token
/data/fs/linux-2.6-hdr/include/linux/string.h:41:12: error: expected identifier or '(' before '__extension__'
/data/fs/linux-2.6-hdr/include/linux/string.h:53:15: error: expected identifier or '(' before '__extension__'
/data/fs/linux-2.6-hdr/include/linux/string.h:61:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'skip_spaces'
/data/fs/linux-2.6-hdr/include/linux/string.h:65:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
/data/fs/linux-2.6-hdr/include/linux/string.h:83:15: error: expected identifier or '(' before '__extension__'
/data/fs/linux-2.6-hdr/include/linux/string.h:83:15: error: expected identifier or '(' before ')' token
/data/fs/linux-2.6-hdr/include/linux/string.h:86:15: error: expected identifier or '(' before '__extension__'
/data/fs/linux-2.6-hdr/include/linux/string.h:86:15: error: expected identifier or '(' before ')' token
/data/fs/linux-2.6-hdr/include/linux/string.h:89:24: error: expected identifier or '(' before '__extension__'
/data/fs/linux-2.6-hdr/include/linux/string.h:89:24: error: expected identifier or '(' before ')' token
/data/fs/linux-2.6-hdr/include/linux/string.h:92:24: error: expected identifier or '(' before '__extension__'
/data/fs/linux-2.6-hdr/include/linux/string.h:92:24: error: expected identifier or '(' before ')' token

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
2012-10-02 18:01:56 +01:00
..
alpha UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
arm UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
arm64 UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
avr32 UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
blackfin UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
c6x UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
cris UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
frv UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
h8300 UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
hexagon UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
ia64 UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
m32r UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
m68k UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
microblaze UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
mips UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
mn10300 UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
openrisc UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
parisc UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
powerpc UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
s390 UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
score UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
sh UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
sparc UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
tile UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
um UAPI: Partition the header include path sets and add uapi/ header directories 2012-10-02 18:01:26 +01:00
unicore32 UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
x86 UAPI: x86: Fix insn_sanity build failure after UAPI split 2012-10-02 18:01:56 +01:00
xtensa UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00
.gitignore
Kconfig Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-10-01 10:43:39 -07:00