prepare for the transition to linux 2.6.22 - make it possible to override the kernel...
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.22 / 900-headers_type_and_time.patch
1 diff -urN linux-2.6.21.1.old/include/linux/time.h linux-2.6.21.1.dev/include/linux/time.h
2 --- linux-2.6.21.1.old/include/linux/time.h     2007-04-27 23:49:26.000000000 +0200
3 +++ linux-2.6.21.1.dev/include/linux/time.h     2007-05-26 21:23:19.859617680 +0200
4 @@ -1,6 +1,10 @@
5  #ifndef _LINUX_TIME_H
6  #define _LINUX_TIME_H
7  
8 +#ifndef __KERNEL__
9 +#include <time.h>
10 +#else
11 +
12  #include <linux/types.h>
13  
14  #ifdef __KERNEL__
15 @@ -225,4 +229,6 @@
16   */
17  #define TIMER_ABSTIME                  0x01
18  
19 +#endif /* __KERNEL__ DEBIAN */
20 +
21  #endif
22 diff -urN linux-2.6.21.1.old/include/linux/types.h linux-2.6.21.1.dev/include/linux/types.h
23 --- linux-2.6.21.1.old/include/linux/types.h    2007-04-27 23:49:26.000000000 +0200
24 +++ linux-2.6.21.1.dev/include/linux/types.h    2007-05-26 21:23:19.859617680 +0200
25 @@ -1,6 +1,14 @@
26  #ifndef _LINUX_TYPES_H
27  #define _LINUX_TYPES_H
28  
29 +/* Debian: Use userland types instead.  */
30 +#ifndef __KERNEL__
31 +# include <sys/types.h>
32 +/* For other kernel headers.  */
33 +# include <linux/posix_types.h>
34 +# include <asm/types.h>
35 +#else
36 +
37  #ifdef __KERNEL__
38  
39  #define BITS_TO_LONGS(bits) \
40 @@ -162,6 +170,8 @@
41  
42  #endif /* __KERNEL_STRICT_NAMES */
43  
44 +#endif /* __KERNEL__ DEBIAN */
45 +
46  /*
47   * Below are truly Linux-specific types that should never collide with
48   * any application/library that wants linux/types.h.