09118bc0e0018f47583a4fc53021cfbe398af8a8
[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,16 @@
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 +/* For util-linux / cryptoloop. How lame. */
37 +typedef __u32 __kernel_dev_t;
38 +#else
39 +
40 #ifdef __KERNEL__
41 #include <linux/config.h>
42
43 @@ -147,6 +157,8 @@
44
45 #endif /* __KERNEL_STRICT_NAMES */
46
47 +#endif /* __KERNEL__ DEBIAN */
48 +
49 /*
50 * Below are truly Linux-specific types that should never collide with
51 * any application/library that wants linux/types.h.
52 @@ -167,9 +179,9 @@
53 typedef __u16 __bitwise __be16;
54 typedef __u32 __bitwise __le32;
55 typedef __u32 __bitwise __be32;
56 -#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
57 -typedef __u64 __bitwise __le64;
58 -typedef __u64 __bitwise __be64;
59 +#if defined(__GNUC__)
60 +__extension__ typedef __u64 __bitwise __le64;
61 +__extension__ typedef __u64 __bitwise __be64;
62 #endif
63
64 #ifdef __KERNEL__