fix uclibc compile
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches / 900-headers_type_and_time.patch
1 Taken from Debian linux-kernel-headers package
2 Update 2005-05-05 gotom, add __extension__ for linux/types.h.
3
4 --- linux.old/include/linux/time.h 2006-06-05 13:18:23.000000000 -0400
5 +++ linux.dev/include/linux/time.h 2006-06-10 00:16:51.962628154 -0400
6 @@ -1,6 +1,10 @@
7 #ifndef _LINUX_TIME_H
8 #define _LINUX_TIME_H
9
10 +#ifndef __KERNEL__
11 +#include <time.h>
12 +#else
13 +
14 #include <linux/types.h>
15
16 #ifdef __KERNEL__
17 @@ -196,4 +200,6 @@
18 */
19 #define TIMER_ABSTIME 0x01
20
21 +#endif /* __KERNEL__ DEBIAN */
22 +
23 #endif
24 --- linux.old/include/linux/types.h 2006-06-05 13:18:23.000000000 -0400
25 +++ linux.dev/include/linux/types.h 2006-06-10 00:16:51.962628154 -0400
26 @@ -1,6 +1,14 @@
27 #ifndef _LINUX_TYPES_H
28 #define _LINUX_TYPES_H
29
30 +/* Debian: Use userland types instead. */
31 +#ifndef __KERNEL__
32 +# include <sys/types.h>
33 +/* For other kernel headers. */
34 +# include <linux/posix_types.h>
35 +# include <asm/types.h>
36 +#else
37 +
38 #ifdef __KERNEL__
39 #include <linux/config.h>
40
41 @@ -147,6 +157,8 @@
42
43 #endif /* __KERNEL_STRICT_NAMES */
44
45 +#endif /* __KERNEL__ DEBIAN */
46 +
47 /*
48 * Below are truly Linux-specific types that should never collide with
49 * any application/library that wants linux/types.h.