[kernel] revert 15922 - add back 2.6.29 kernel support
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.29 / 900-headers_type_and_time.patch
1 --- a/include/linux/time.h
2 +++ b/include/linux/time.h
3 @@ -1,6 +1,10 @@
4  #ifndef _LINUX_TIME_H
5  #define _LINUX_TIME_H
6  
7 +#ifndef __KERNEL__
8 +#include <time.h>
9 +#else
10 +
11  #include <linux/types.h>
12  
13  #ifdef __KERNEL__
14 @@ -240,4 +244,6 @@ struct itimerval {
15   */
16  #define TIMER_ABSTIME                  0x01
17  
18 +#endif /* __KERNEL__ DEBIAN */
19 +
20  #endif
21 --- a/include/linux/types.h
22 +++ b/include/linux/types.h
23 @@ -1,6 +1,14 @@
24  #ifndef _LINUX_TYPES_H
25  #define _LINUX_TYPES_H
26  
27 +/* Debian: Use userland types instead.  */
28 +#ifndef __KERNEL__
29 +# include <sys/types.h>
30 +/* For other kernel headers.  */
31 +# include <linux/posix_types.h>
32 +# include <asm/types.h>
33 +#else
34 +
35  #ifdef __KERNEL__
36  
37  #define DECLARE_BITMAP(name,bits) \
38 @@ -156,6 +164,8 @@ typedef unsigned long blkcnt_t;
39  
40  #endif /* __KERNEL_STRICT_NAMES */
41  
42 +#endif /* __KERNEL__ DEBIAN */
43 +
44  /*
45   * Below are truly Linux-specific types that should never collide with
46   * any application/library that wants linux/types.h.